Mercurial > p > roundup > code
changeset 4752:5350126b32ea
Add more jinja2 templates
| author | Pradip Caulagi <caulagi@gmail.com> |
|---|---|
| date | Sun, 03 Feb 2013 00:08:54 +0530 |
| parents | a8c95abaf3fb |
| children | df36d7bd9a02 |
| files | share/roundup/templates/jinja2/html/file.index.html share/roundup/templates/jinja2/html/file.item.html share/roundup/templates/jinja2/html/home.classlist.html share/roundup/templates/jinja2/html/issue.index.html share/roundup/templates/jinja2/html/issue.item.edit.html share/roundup/templates/jinja2/html/issue.item.html share/roundup/templates/jinja2/html/issue.item.readonly.html share/roundup/templates/jinja2/html/msg.index.html share/roundup/templates/jinja2/html/msg.item.html share/roundup/templates/jinja2/html/user.index.html share/roundup/templates/jinja2/html/user.item.html |
| diffstat | 11 files changed, 475 insertions(+), 148 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/file.index.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,33 @@ +<h4>Files</h4> +<table class='table'> + <tr> + <th i18n:translate="">File name</th> + <th i18n:translate="">Uploaded</th> + <th i18n:translate="">Type</th> + <th i18n:translate="">Edit</th> + <th i18n:translate="">Remove</th> + </tr> + {% for file in context.files %} + <tr> + <td> + <a href='{{ file.download_url() }}'>{{ file.name }}</a> + </td> + <td>{{ file.creator }}, {{ file.creation }}</td> + <td>{{ file.type }}</td> + {% if file.is_edit_ok %} + <td> + <a href='file{{ file.id }}'>edit</a> + </td> + {% endif %} + {% if context.is_edit_ok %} + <td> + <form method="POST" action='issue{{ context.id }}'> + <input type="hidden" name="@remove@files" value='file.id'> + <input type="hidden" name="@action" value="edit"> + <input type="submit" value="remove" i18n:attributes="value"> + </form> + </td> + {% endif %} + </tr> + {% endfor %} +</table>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/file.item.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,42 @@ +{% extends 'layout/page.html' %} + +{% block content %} + <div class='page-header'> + <h1>File display</h1> + </div> + + {% include 'layout/permission.html' %} + + {% if context.is_view_ok() %} + <form method="POST" + enctype="multipart/form-data" action='{{ context.designator() }}'> + + <dl class='dl-horizontal'> + <dt>Name</dt> + <dd>{{ context.name.field() }}</dd> + <dt>Content Type</dt> + <dd>{{ context.type.field() }}</dd> + </dl> + + <input type="hidden" name="@template" value="item"> + <input type="hidden" name="@required" value="name,type"> + {% if request.form.has_key('@multilink') %} + <input type="hidden" name="@multilink" + value='request.form.@multilink.value()'> + {% endif %} + <div class='form-actions'> + {{ context.submit() }} + </div> + </form> + {% endif %} + + {% if context.id and context.is_view_ok() %} + <div class='row-fluid'> + <a href='file{{ context.id }}/{{ context.name }}'>Download</a> + </div> + {% endif %} + + <div class='vspace-five'></div> + {{ context.history() }} + +{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/home.classlist.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,25 @@ +{% extends 'layout/page.html' %} + +{% block content %} + <div class='page-header'> + <h1>List of classes</h1> + </div> + + <div class='row-fluid'> + {% for cl in db.classes() %} + <div class='span4'> + <h4> + <a href='{{cl.classname}}'>{{ cl.classname.capitalize() }}</a> + </h4> + + {% for prop in cl.properties() %} + <p> + <b>{{ prop._name }}</b> - + {{ prop._prop }} + </p> + {% endfor %} + </div> + {% endfor %} + </div> + +{% endblock %}
--- a/share/roundup/templates/jinja2/html/issue.index.html Sat Feb 02 19:07:00 2013 +0530 +++ b/share/roundup/templates/jinja2/html/issue.index.html Sun Feb 03 00:08:54 2013 +0530 @@ -9,23 +9,21 @@ {% if context.is_view_ok %} <table class='table'> - <tr> - <th i18n:translate="">Priority</th> - <th i18n:translate="">ID</th> - <th i18n:translate="">Creation</th> - <th i18n:translate="">Activity</th> - <th i18n:translate="">Actor</th> - <th i18n:translate="">Keyword</th> - <th i18n:translate="">Title</th> - <th i18n:translate="">Status</th> - <th i18n:translate="">Creator</th> - <th i18n:translate="">Assigned To</th> + <tr class='info'> + <td>Priority</td> + <td>ID</td> + <td>Activity</td> + <td>Actor</td> + <td>Keyword</td> + <td>Title</td> + <td>Status</td> + <td>Creator</td> + <td>Assigned To</td> </tr> {% for issue in context.list() %} <tr> <td>{{ issue.priority.plain() }}</td> <td>{{ issue.id }}</td> - <td>{{ issue.creation }}</td> <td>{{ issue.activity }}</td> <td>{{ issue.actor }}</td> <td>{{ issue.keyword.plain() }}</td> @@ -45,7 +43,9 @@ {% include 'layout/pagination.html' %} <div class='row-fluid'> - <a href="{{ request.indexargs_url('issue', {'@action':'export_csv'}) }}">Download as CSV</a> + <div class='pull-right'> + <a class='btn btn-success' href="{{ request.indexargs_url('issue', {'@action':'export_csv'}) }}">Download as CSV</a> + </div> </div> {% include 'layout/sort.html' %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/issue.item.edit.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,98 @@ +<form method="POST" + {% if context.id %} + action='issue{{ context.id }}' + {% else %} + action='issue' + {% endif %} + name="itemSynopsis" + enctype="multipart/form-data" + > + <fieldset> + <div class='container-fluid form-horizontal'> + <!-- title --> + <div class='row-fluid'> + <div class='control-group'> + <label class='control-label' for='title'>Title</label> + <div class='controls'> + <input name='title' id='title' type='text' class='input-xxlarge' value='{{ context.title }}' required> + </div> + </div> + </div> <!-- row-fluid --> + + <!-- priority & Status --> + <div class='row-fluid'> + <div class='control-group span6'> + <label class='control-label' for='priority'>Priority</label> + <div class='controls'> + {{ context.priority.menu() }} + </div> + </div> + <div class='control-group span6'> + <label class='control-label' for='status'>Status</label> + <div class='controls'> + {{ context.status.menu() }} + </div> + </div> + </div> <!-- row-fluid --> + + <!-- Superseder & nosy list --> + <div class='row-fluid'> + <div class='control-group span6'> + <label class='control-label' for='superseder'>Superseder</label> + <div class='controls'> + <input type='text' name='superseder'> + </div> + </div> + <div class='control-group span6'> + <label class='control-label' for='nosylist'>Nosy list</label> + <div class='controls'> + <input type='text' name='nosy'> + </div> + </div> + </div> <!-- row-fluid --> + + <!-- Assigned to & keywords --> + <div class='row-fluid'> + <div class='control-group span6'> + <label class='control-label' for='assignedto'>Assigned to</label> + <div class='controls'> + {{ context.assignedto.menu() }} + </div> + </div> + <div class='control-group span6'> + <label class='control-label' for='keywords'>Keywords</label> + <div class='controls'> + <input type='text' name='keywords' id='keywords'> + </div> + </div> + </div> <!-- row-fluid --> + + <!-- Note --> + <div class='row-fluid'> + <div class='control-group'> + <label class='control-label' for='change_note'>Change note</label> + <div class='controls'> + <textarea name="@note" rows="5" class='input-xxlarge' id='change_note'></textarea> + </div> + </div> + </div> <!-- row-fluid --> + + <!-- File upload --> + <div class='row-fluid'> + <div class='control-group'> + <label class='control-label' for='file_upload'>File</label> + <div class='controls'> + <input type="file" name="@file" id='file_upload'> + </div> + </div> + </div> <!-- row-fluid --> + </fieldset> + <div class='form-actions'> + {{ context.submit() }} + {% if context.id %} + <a href='{{ context.copy_url }}'>Make a copy</a> + {% endif %} + </div> + <input type="hidden" name="@template" value="item"> + <input type="hidden" name="@required" value="title,priority"> +</form>
--- a/share/roundup/templates/jinja2/html/issue.item.html Sat Feb 02 19:07:00 2013 +0530 +++ b/share/roundup/templates/jinja2/html/issue.item.html Sun Feb 03 00:08:54 2013 +0530 @@ -28,107 +28,12 @@ {% include 'layout/permission.html' %} - {% if context.is_view_ok %} - <form method="POST" - {% if context.id %} - action='issue{{ context.id }}' - {% else %} - action='issue' - {% endif %} - name="itemSynopsis" - enctype="multipart/form-data" - > - <fieldset> - {% if context.is_edit_ok %} - <div class='container-fluid form-horizontal'> - <!-- title --> - <div class='row-fluid'> - <div class='control-group'> - <label class='control-label' for='title'>Title</label> - <div class='controls'> - <input name='title' id='title' type='text' class='input-xxlarge' value='{{ context.title }}' required> - </div> - </div> - </div> <!-- row-fluid --> - - <!-- priority & Status --> - <div class='row-fluid'> - <div class='control-group span6'> - <label class='control-label' for='priority'>Priority</label> - <div class='controls'> - {{ context.priority.menu() }} - </div> - </div> - <div class='control-group span6'> - <label class='control-label' for='status'>Status</label> - <div class='controls'> - {{ context.status.menu() }} - </div> - </div> - </div> <!-- row-fluid --> - - <!-- Superseder & nosy list --> - <div class='row-fluid'> - <div class='control-group span6'> - <label class='control-label' for='superseder'>Superseder</label> - <div class='controls'> - <input type='text' name='superseder'> - </div> - </div> - <div class='control-group span6'> - <label class='control-label' for='nosylist'>Nosy list</label> - <div class='controls'> - <input type='text' name='nosy'> - </div> - </div> - </div> <!-- row-fluid --> - - <!-- Assigned to & keywords --> - <div class='row-fluid'> - <div class='control-group span6'> - <label class='control-label' for='assignedto'>Assigned to</label> - <div class='controls'> - {{ context.assignedto.menu() }} - </div> - </div> - <div class='control-group span6'> - <label class='control-label' for='keywords'>Keywords</label> - <div class='controls'> - <input type='text' name='keywords' id='keywords'> - </div> - </div> - </div> <!-- row-fluid --> - - <!-- Note --> - <div class='row-fluid'> - <div class='control-group'> - <label class='control-label' for='change_note'>Change note</label> - <div class='controls'> - <textarea name="@note" rows="5" class='input-xxlarge' id='change_note'></textarea> - </div> - </div> - </div> <!-- row-fluid --> - - <!-- File upload --> - <div class='row-fluid'> - <div class='control-group'> - <label class='control-label' for='file_upload'>File</label> - <div class='controls'> - <input type="file" name="@file" id='file_upload'> - </div> - </div> - </div> <!-- row-fluid --> - {% endif %} - </fieldset> - <div class='form-actions'> - {{ context.submit() }} - {% if context.id %} - <a href='{{ context.copy_url }}'>Make a copy</a> - {% endif %} - </div> - <input type="hidden" name="@template" value="item"> - <input type="hidden" name="@required" value="title,priority"> - </form> + {% if context.is_view_ok() %} + {% if context.is_edit_ok() %} + {% include 'issue.item.edit.html' %} + {% else %} + {% include 'issue.item.readonly.html' %} + {% endif %} {% endif %} {% if context.id %} @@ -141,39 +46,7 @@ {% endif %} {% if context.files %} - <h4>Files</h4> - <table class='table'> - <tr> - <th i18n:translate="">File name</th> - <th i18n:translate="">Uploaded</th> - <th i18n:translate="">Type</th> - <th i18n:translate="">Edit</th> - <th i18n:translate="">Remove</th> - </tr> - {% for file in context.files %} - <tr> - <td> - <a href='{{ file.download_url }}'>{{ file.name }}</a> - </td> - <td>{{ file.creator }}, {{ file.creation }}</td> - <td>{{ file.type }}</td> - {% if file.is_edit_ok %} - <td> - <a href='file{{ file.id }}'>edit</a> - </td> - {% endif %} - {% if context.is_edit_ok %} - <td> - <form method="POST" action='issue{{ context.id }}'> - <input type="hidden" name="@remove@files" value='file.id'> - <input type="hidden" name="@action" value="edit"> - <input type="submit" value="remove" i18n:attributes="value"> - </form> - </td> - {% endif %} - </tr> - {% endfor %} - </table> + {% include 'file.index.html' %} {% endif %} {% if context.messages %} @@ -204,7 +77,7 @@ {% endif %} <div class='vspace-five'></div> + {{ context.history() }} {% endblock %} -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/issue.item.readonly.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,16 @@ +<dl class='dl-horizontal'> + <dt>Title</dt> + <dd>{{ context.title.plain() }}</dd> + <dt>Priority</dt> + <dd>{{ context.priority.plain() }}</dd> + <dt>Status</dt> + <dd>{{ context.status.plain() }}</dd> + <dt>Superseder</dt> + <dd>{{ context.superseder.plain() }}</dd> + <dt>Nosy list</dt> + <dd>{{ context.nosy.plain() }}</dd> + <dt>Assigned to</dt> + <dd>{{ context.assignedto.plain() }}</dd> + <dt>Keywords</dt> + <dd>{{ context.keyword.plain() }}</dd> +</dl>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/msg.index.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,25 @@ +{% extends 'layout/page.html' %} + +{% block content %} + <div class='page-header'> + <h1>List of messages</h1> + </div> + + {% for msg in context.list() %} + <div class='row-fluid'> + <dl class='span5 dl-horizontal'> + <dt>Author</dt> + <dd>{{ msg.author }}</dd> + <dt>Date</dt> + <dd>{{ msg.date }}</dd> + <dt>Message id</dt> + <dd>{{ msg.id }}</dd> + </dl> + <div class='span7'> + <pre>{{ msg.content }}</pre> + </div> + </div> + <hr> + {% endfor %} + +{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/msg.item.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,51 @@ +{% extends 'layout/page.html' %} + +{% block head_title %} + {% if context.id %} + Message {{ context.id }} - {{ config.TRACKER_NAME }} + {% else %} + New Message - {{ config.TRACKER_NAME }} + {% endif %} +{% endblock %} + +{% block content %} + <div class='page-header'> + <h1> + {% if not (context.id or context.is_edit_ok()) %} + New Message + {% elif not context.id and context.is_edit_ok() %} + New Message Editing + {% elif context.id and not context.is_edit_ok() %} + Message{{ context.id }} + {% elif context.id and context.is_edit_ok() %} + Message{{ context.id }} editing + {% endif %} + </h1> + </div> + + {% include 'layout/permission.html' %} + + {% if context.is_view_ok() %} + <dl class='dl-horizontal'> + <dt>Author</dt> + <dd>{{ context.author }} </dd> + <dt>Recipients</dt> + <dd>{{ context.recipients }}</dd> + <dt>Date</dt> + <dd>{{ context.date }}</dd> + </dl> + + <div class='row-fluid'> + <h4>Content</h4> + <pre>{{ context.content.hyperlinked }}</pre> + </div> + {% endif %} + + {% if context.files %} + {% include 'file.index.html' %} + {% endif %} + + <div class='vspace-five'></div> + {{ context.history() }} + +{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/user.index.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,49 @@ +{% extends 'layout/page.html' %} + +{% block head_title %} + User listing - {{ config.TRACKER_NAME }} +{% endblock %} + +{% block content %} + <div class='page-header'> + <h1>User listing</h1> + </div> + + {% include 'layout/permission.html' %} + + {% if context.is_view_ok() %} + <table class='table'> + <tr class='info'> + <td>Username</td> + <td>Real name</td> + <td>Organisation</td> + <td>Email address</td> + <td>Phone number</td> + {% if context.is_retire_ok() %} + <td>Retire</td> + {% endif %} + </tr> + {% for user in context.list() %} + <tr> + <td> + <a href='user{{ user.id }}'>{{ user.username }}</a> + </td> + <td>{{ user.realname.plain() }}</td> + <td>{{ user.organisation.plain() }}</td> + <td>{{ user.address.email() }}</td> + <td>{{ user.phone.plain() }}</td> + {% if context.is_retire_ok() %} + <td> + <form method="POST" action='user{{ user.id }}' class='form-inline'> + <input type="hidden" name="@template" value="index"> + <input type="hidden" name="@action" value="retire"> + <input type="submit" value="retire" class='btn btn-small'> + </form> + </td> + {% endif %} + </tr> + {% endfor %} + </table> + {% endif %} + +{% endblock %}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/roundup/templates/jinja2/html/user.item.html Sun Feb 03 00:08:54 2013 +0530 @@ -0,0 +1,115 @@ +{% extends 'layout/page.html' %} + +{% block head_title %} + {% if context.id %} + User {{ context.id }} - {{ config.TRACKER_NAME }} + {% else %} + New User - {{ config.TRACKER_NAME }} + {% endif %} +{% endblock %} + +{% block content %} + <div class='page-header'> + <h1> + {% if not (context.id or context.is_edit_ok()) %} + New User + {% elif not context.id and context.is_edit_ok() %} + New User Editing + {% elif context.id and not context.is_edit_ok() %} + User{{ context.id }} + {% elif context.id and context.is_edit_ok() %} + User{{ context.id }} editing + {% endif %} + </h1> + </div> + + {% include 'layout/permission.html' %} + + {% if context.is_view_ok() %} + <form method="POST" + name ="itemSynopsis" + enctype ="multipart/form-data" + action ='{{ context.designator() }}'> + <table> + <tr> + <th>Name</th> + <td> + <input type='text' name="realname" value='{{ context.realname }}'> + </td> + </tr> + <tr> + <th>Login Name</th> + <td> + <input type='text' name='username' value='{{ context.username }}'> + </td> + </tr> + {% if context.is_edit_ok() %} + <tr> + <th>Login Password</th> + <td> + <input type='password' name='password'> + </td> + </tr> + <tr> + <th>Confirm Password</th> + <td> + <input type='password' name='confirm_input'> + </td> + </tr> + {% endif %} + {% if request.user.hasPermission('Web Roles') %} + <tr> + <th>Roles <br>(comma separated)</th> + <td> + <input type='text' name='roles' value='{{ context.roles }}'> + </td> + </tr> + {% endif %} + <tr> + <th>Phone</th> + <td> + <input type='text' name='phone' value='{{ context.phone }}'> + </td> + </tr> + <tr> + <th>Organisation</th> + <td> + <input type='text' name='organisation' value='{{ context.organisation }}'> + </td> + </tr> + {% if context.timezone %} + <tr> + <th>Timezone</th> + <td> + <input type='text' name='timezone' value='{{ context.timezone}}'> + </td> + </tr> + {% endif %} + <tr> + <th>Email</th> + <td> + <input type='text' name='address' value='{{ context.address }}'> + </td> + </tr> + <tr> + <th>Alternate email address <br>One address per line</th> + <td> + {{ context.alternate_addresses.multiline() }} + </td> + </tr> + {% if context.is_edit_ok() %} + <tr class='form-actions'> + <td> + <input type="hidden" name="@template" value="item"> + {{ context.submit() }} + </td> + </tr> + {% endif %} + </table> + </form> + {% endif %} + + <div class='vspace-five'></div> + {{ context.history() }} + +{% endblock %}
