diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
commit | 63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch) | |
tree | 555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/notes | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/notes')
-rwxr-xr-x | servo/templates/notes/edit_escalation.html | 17 | ||||
-rwxr-xr-x | servo/templates/notes/find.html | 39 | ||||
-rwxr-xr-x | servo/templates/notes/form.html | 112 | ||||
-rwxr-xr-x | servo/templates/notes/list_notes.html | 75 | ||||
-rw-r--r-- | servo/templates/notes/messages.html | 22 | ||||
-rwxr-xr-x | servo/templates/notes/remove.html | 17 | ||||
-rwxr-xr-x | servo/templates/notes/search-results.html | 25 | ||||
-rwxr-xr-x | servo/templates/notes/search.html | 18 | ||||
-rwxr-xr-x | servo/templates/notes/templates.html | 10 | ||||
-rwxr-xr-x | servo/templates/notes/view_escalation.html | 1 | ||||
-rwxr-xr-x | servo/templates/notes/view_note.html | 38 |
11 files changed, 374 insertions, 0 deletions
diff --git a/servo/templates/notes/edit_escalation.html b/servo/templates/notes/edit_escalation.html new file mode 100755 index 0000000..c4e34c1 --- /dev/null +++ b/servo/templates/notes/edit_escalation.html @@ -0,0 +1,17 @@ +{% extends "notes/view_note.html" %} +{% load i18n %} + +{% block note_buttons %} +{% endblock note_buttons %} + +{% block view_message %} + <form action="{{ request.path }}" method="post" class="form-horizontal" enctype="multipart/form-data"> + {% csrf_token %} + {% include "form_snippet.html" %} + <div class="form-actions"> + <div class="pull-right"> + <button class="btn btn-primary" type="submit">{% trans "Submit" %}</button> + </div> + </div> + </form> +{% endblock view_message %} diff --git a/servo/templates/notes/find.html b/servo/templates/notes/find.html new file mode 100755 index 0000000..1a55793 --- /dev/null +++ b/servo/templates/notes/find.html @@ -0,0 +1,39 @@ +{% extends "notes/list_notes.html" %} +{% load i18n %} + +{% block second_row %} +<div class="row-fluid" style="margin-top:30px"> + <div class="span12"> + <ul class="nav nav-tabs"> + <li><a href="{% url 'notes-list_notes' 'inbox' %}">{% trans "Browse" %}</a></li> + <li class="active"><a href="{% url 'notes-find' %}">{% trans "Search" %}</a></li> + </ul> + </div> +</div> +<div class="row-fluid"> + <div class="span12 well"> + <form action="" method="get"> + {% for field in form %} + <div class="control-group pull-left" style="margin-right:10px"> + <label class="control-label">{{ field.label }}</label> + <div class="controls">{{ field }}</div> + </div> + {% endfor %} + <div class="control-group"> + <label class="control-label"> </label> + <div class="controls"> + <button class="btn btn-primary pull-right" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button> + </div> + </div> + </div> + </form> + </div> +</div> +<div class="container-fluid"> + <div class="row-fluid"> + <div class="span12"> + {% include "notes/search-results.html" %} + </div> + </div> +</div> +{% endblock second_row %} diff --git a/servo/templates/notes/form.html b/servo/templates/notes/form.html new file mode 100755 index 0000000..372da30 --- /dev/null +++ b/servo/templates/notes/form.html @@ -0,0 +1,112 @@ +{% extends "two_column_layout.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block first_column %} +{% with note.order as order %} +{% if order %} +{% if order.customer %} +{% include "orders/customer.html" with nodes=order.customer_list %} +<hr/> +{% endif %} +{% for device in order.devices.all %} +<p> + <strong>{{ device.description }}</strong><br/> + <small class="muted">{{ device.configuration }}</small><br/> + <small class="muted"><i class="icon-barcode"></i> {{ device.sn }}</small> +</p> +{% endfor %} +<hr/> +{% for p in order.products %} +<small><strong>{{ p.code }}</strong></small><small class="pull-right">{{ p.price|currency }}</small><br/> +<small class="muted">{{ p.title }}</small><br/> +{% endfor %} +<hr/> +<strong>{% trans "Total" %}:</strong> +<span class="pull-right"><strong>{{ order.gross_total|currency }}</strong></span> +{% endif %} +{% endwith %} +{% endblock first_column %} + +{% block second_column %} + +<form action="" method="post" accept-charset="utf-8" enctype="multipart/form-data" class="form-horizontal"> + {% csrf_token %} + {{ form.customer }} + <ul class="nav nav-tabs"> + <li class="active"><a href="#tab1" data-toggle="tab">{% trans "Note" %}</a></li> + <li><a href="#tab2" data-toggle="tab">{% trans "Attachments" %}</a></li> + <li><a href="#tab3" data-toggle="tab">{% trans "Labels" %}</a></li> + <li><a href="#tab4" data-toggle="tab">{% trans "Escalation" %}</a></li> + </ul> + {{ formset.management_form }} + {{ form.order }} + {% if note.parent %} + {{ form.parent }} + {% endif %} + <div class="tab-content"> + <div class="tab-pane active" id="tab1"> + {% include "form_field_snippet.html" with field=form.recipient %} + {% include "form_field_snippet.html" with field=form.subject %} + {% include "form_field_snippet.html" with field=form.sender %} + {% include "form_field_snippet.html" with field=form.body %} + {% include "form_field_snippet.html" with field=form.is_reported %} + </div> + <div class="tab-pane" id="tab2"> + {% for f in formset %} + {% include "form_snippet.html" with form=f %} + {% endfor %} + </div> + <div class="tab-pane" id="tab3"> + {% include "form_field_snippet.html" with field=form.labels %} + </div> + <div class="tab-pane" id="tab4"> + {% include "form_field_snippet.html" with field=escalation_form.issue_type %} + {% include "form_field_snippet.html" with field=escalation_form.status %} + {% include "form_field_snippet.html" with field=escalation_form.gsx_account %} + {% for k, v in contexts.items %} + <div class="control-group"> + <select name="keys" class="control-label"> + {% for i, f in fields %} + <option{% if i == k %} selected="selected"{% endif %} value="{{ i }}">{{ f }}</option> + {% endfor %} + </select> + <div class="controls"> + <div class="input-append"> + <input type="text" name="values" value="{{ v }}"/> + <a class="btn remove_field"><i class="icon-remove"></i></a> + </div> + </div> + </div> + {% endfor %} + <div class="control-group property"> + <select name="keys" class="control-label"> + {% for i, f in fields %} + <option value="{{ i }}">{{ f }}</option> + {% endfor %} + </select> + <div class="controls"> + <div class="input-append"> + <input type="text" name="values"/> + <a class="btn remove_field disabled"><i class="icon-remove"></i></a> + </div> + </div> + </div> + </div> + </div> + <div class="form-actions"> + {% if note.pk %} + <a class="btn btn-danger" href="{% url 'notes-delete_note' note.pk %}" data-modal="#modal">{% trans "Delete" %}</a> + {% endif %} + <input type="submit" class="btn btn-primary" value="{% trans "Save" %}"/> + </div> +</form> +{% endblock second_column %} + +{% block crumbs %} +{% if note.order %} + <li><a href="{{ order.get_queue_url }}">{{ order.get_queue_title }}</a> <span class="divider">/</span></li> + <li><a href="{{ order.get_absolute_url }}">{% trans "Order" %} {{ order.code }}</a> <span class="divider">/</span></li> + <li class="active">{% trans "Edit Note" %}</li> +{% endif %} +{% endblock crumbs %} diff --git a/servo/templates/notes/list_notes.html b/servo/templates/notes/list_notes.html new file mode 100755 index 0000000..fdbc853 --- /dev/null +++ b/servo/templates/notes/list_notes.html @@ -0,0 +1,75 @@ +{% extends "default.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block toolbar %} +<div class="btn-group"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-file"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li><a href="{% url 'notes-create' %}">{% trans "New Message" %}</a></li> + <!--<li><a href="{% url 'notes-create_escalation' %}">{% trans "New Escalation" %}</a></li>//--> + </ul> +</div> +{% block note_buttons %} +<div class="btn-group"> + <a class="btn dropdown-toggle disabled" data-toggle="dropdown" href="#"> + <i class="icon-flag"></i> <span class="caret"></span> + </a> +</div> +{% endblock note_buttons %} +{% endblock toolbar %} + +{% block content %} + +{% block second_row %} +<ul class="nav nav-tabs" style="margin-top:30px"> + <li class="active"><a href="{% url 'notes-list_notes' 'inbox' %}">{% trans "Browse" %}</a></li> + <li><a href="{% url 'notes-find' %}">{% trans "Search" %}</a></li> +</ul> + +<div class="row-fluid"> + <div class="span2"> + {% block first_column %} + <ul class="nav nav-list"> + <li class="nav-header">{% trans "Messages" %}</li> + <li class="{% active request "inbox" %}"><a href="{% url 'notes-list_notes' kind="inbox" %}">{% trans "Inbox" %} <span class="badge pull-right">{{ inbox_count|safe }}</span></a></li> + <li class="{% active request "flagged" %}"><a href="{% url 'notes-list_notes' kind="flagged" %}">{% trans "Flagged" %}</a></li> + <li class="{% active request "sent" %}"><a href="{% url 'notes-list_notes' kind="sent" %}">{% trans "Sent" %}</a></li> + <!--<li class="{% active request "escalations" %}"><a href="{% url 'notes-list_notes' kind="escalations" %}">{% trans "Escalations" %}</a></li>//--> + </ul> + {% endblock first_column %} + </div> + <div class="span3"> + {% block second_column %} + <ul class="nav nav-list"> + <li class="nav-header">{% trans kind %}</li> + {% for note in notes %} + <li class="{% active request 'notes' kind note.pk 'view' %}"> + <a href="{% url 'notes-view_note' kind note.pk %}"> + <strong>{{ note.sender }}</strong><span class="pull-right">{{ note.created_at|date:"SHORT_DATE_FORMAT" }}</span> + <br/> + <small>{{ note.body|truncatechars:30 }}</small> + </a> + </li> + {% empty %} + <li class="disabled text-center"><a href="#">{% trans "No messages found" %}</a></li> + {% endfor %} + </ul> + {% include "pagination.html" with items=notes %} + {% endblock second_column %} + </div> + <div class="span7"> + {% block view_message %} + <h2 class="muted text-center">{% trans "No message selected" %}</h2> + {% endblock view_message %} + </div> +</div> +{% endblock second_row %} + +{% endblock content %} + +{% block crumbs %} +<li class="active">{% trans "Notes" %}</li> +{% endblock crumbs %} diff --git a/servo/templates/notes/messages.html b/servo/templates/notes/messages.html new file mode 100644 index 0000000..84bbd42 --- /dev/null +++ b/servo/templates/notes/messages.html @@ -0,0 +1,22 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Message Log" %} +{% endblock header %} + +{% block body %} +<table class="table"> + <tbody> + {% for m in messages %} + <tr> + <td>{{ m.sent_at|date:"SHORT_DATETIME_FORMAT" }}</td> + <td>{{ m.recipient }}</td> + <td>{{ m.status }}</td> + </tr> + {% empty %} + <tr><td colspan="3" class="muted empty">{% trans "No messages to display" %}</td></tr> + {% endfor %} + </tbody> +</table> +{% endblock body %} diff --git a/servo/templates/notes/remove.html b/servo/templates/notes/remove.html new file mode 100755 index 0000000..c79f4b1 --- /dev/null +++ b/servo/templates/notes/remove.html @@ -0,0 +1,17 @@ +{% extends "modal.html" %} +{% load i18n %} + +{% block header %} + {% trans "Delete this note?" %} +{% endblock header %} + +{% block body %} + <p>{% trans "This will also delete any replies to this note." %}</p> +{% endblock body %} + +{% block footer %} + <form action="{% url 'notes-delete_note' note.pk %}" method="post"> + {% csrf_token %} + <button type="submit" class="btn btn-danger">{% trans "Delete" %}</button> + </form> +{% endblock footer %} diff --git a/servo/templates/notes/search-results.html b/servo/templates/notes/search-results.html new file mode 100755 index 0000000..a1ed78d --- /dev/null +++ b/servo/templates/notes/search-results.html @@ -0,0 +1,25 @@ +{% load i18n %} +{% load humanize %} +{% load servo_tags %} + +<ul class="media-list"> + {% for note in notes %} + <li class="media"> + <a class="pull-left" href="#"> + <img src="{{ note.created_by.get_avatar }}" alt="{{ note.created_by }}" title="{{ note.created_by }}" class="img-rounded avatar"/> + </a> + <div class="media-body"> + <h5 class="media-heading">{{ note.get_sender_name }} {{ note.created_at|naturaltime }}{% if note.order %} <a href="{% url 'orders-edit' note.order.pk %}#note-{{ note.pk }}"><i class="icon-share-alt"></i></a>{% endif %}</h5> + {{ note.body|markdown }} + {% for a in note.attachments.all %} + <a class="label label-info window" href="{{ a.content.url }}"><i class="icon-download icon-white"></i> {{ a }}</a> + {% endfor %} + </div> + <hr/> + </li> + {% empty %} + <li class="muted empty">{% trans "No notes found" %}</li> + {% endfor %} +</ul> + +{% include "pagination.html" with items=notes %} diff --git a/servo/templates/notes/search.html b/servo/templates/notes/search.html new file mode 100755 index 0000000..023bb07 --- /dev/null +++ b/servo/templates/notes/search.html @@ -0,0 +1,18 @@ +{% extends "notes/list_notes.html" %} +{% load servo_tags %} +{% load humanize %} +{% load i18n %} + +{% block toolbar %} + <a href="{% url 'notes-create' %}" class="btn"><i class="icon-plus"></i> {% trans "Create Note" %}</a> +{% endblock toolbar %} + +{% block content %} + +<div class="page-header"> + <h1>{{ title }} <small>{{ subtitle }}</small></h1> +</div> + +{% include "notes/search-results.html" %} + +{% endblock content %} diff --git a/servo/templates/notes/templates.html b/servo/templates/notes/templates.html new file mode 100755 index 0000000..e552791 --- /dev/null +++ b/servo/templates/notes/templates.html @@ -0,0 +1,10 @@ +<div class="btn-group pull-left"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-comment"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu template-select"> + {% for t in templates %} + <li><a href="{{ t.get_absolute_url }}">{{ t.title }}</a></li> + {% endfor %} + </ul> +</div> diff --git a/servo/templates/notes/view_escalation.html b/servo/templates/notes/view_escalation.html new file mode 100755 index 0000000..5609587 --- /dev/null +++ b/servo/templates/notes/view_escalation.html @@ -0,0 +1 @@ +{% extends "notes/view_note.html" %} diff --git a/servo/templates/notes/view_note.html b/servo/templates/notes/view_note.html new file mode 100755 index 0000000..05000f6 --- /dev/null +++ b/servo/templates/notes/view_note.html @@ -0,0 +1,38 @@ +{% extends "notes/list_notes.html" %} +{% load servo_tags %} +{% load i18n %} + +{% block note_buttons %} + <div class="btn-group"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-flag"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li><a href="{% url 'notes-toggle_flag' note.pk 'read' %}" class="nofollow">{{ note.get_read_title }}</a></li> + <li><a href="{% url 'notes-toggle_flag' note.pk 'flagged' %}" class="nofollow">{{ note.get_flagged_title }}</a></li> + </ul> + </div> +{% endblock note_buttons %} + +{% block view_message %} + <div class="message-header"> + <p>{% trans "From" %}: {{ note.sender }}</p> + {% if note.order.id %} + <p>{% trans "Service Order" %}: <a href="{% url 'orders-edit' note.order.id %}">{{ note.order.code }}</a></p> + {% endif %} + <p>{% trans "Created" %}: {{ note.created_at|relative_date }}</p> + <p>{% trans "Subject" %}: {{ note.subject }}</p> + </div> + <hr/> + {{ note.body|markdown }} + {% for a in note.attachments.all %} + <a class="label label-info window" href="{{ a.content.url }}"><i class="icon-download icon-white"></i> {{ a }}</a> + {% endfor %} + <div class="form-actions"> + <div class="pull-right"> + <a href="{% url 'servo.views.order.create' note_id=note.id %}" class="btn {% if note.order.id %} disabled {% endif %}">{% trans "Create Order" %}</a> + <a href="{% url 'notes-delete_note' note.id %}" class="btn btn-danger" data-modal="#modal">{% trans "Delete" %}</a> + <a href="{% url 'servo.views.note.edit' parent=note.id %}" class="btn btn-primary">{% trans "Reply" %}</a> + </div> + </div> +{% endblock view_message %} |