diff options
Diffstat (limited to 'app/gtd/templates/gtd/post_table.html')
-rw-r--r-- | app/gtd/templates/gtd/post_table.html | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/app/gtd/templates/gtd/post_table.html b/app/gtd/templates/gtd/post_table.html new file mode 100644 index 0000000..f6803fe --- /dev/null +++ b/app/gtd/templates/gtd/post_table.html @@ -0,0 +1,93 @@ +{% extends 'base_gtd.html' %} +{%block extrahead%} +<link href="/media/sortable.min.css" rel="stylesheet" /> +{%endblock%} +{% block primary %} +<main class="content"> +<div class="results"> +<table class="sortable" id="result_list"> +<thead> +<tr> +<th scope="col" class="sortable column-title"> + <div class="text"><span>Title</span></div> +</th> +<th scope="col" class="column-admin_url"> + <div class="text"><span>URL</span></div> +</th> +<th scope="col" class="column-admin_url"> + <div class="text"><span>Edit URL</span></div> +</th> +<th scope="col" class="sortable column-date_last_pub sorted ascending"> +Date last pub + </th> +<th scope="col" class="sortable column-post_type"> + <div class="text">Post type</div> +</th> +<th scope="col" class="sortable column-update_frequency"> + <div class="text">Freq</div> +</th> +<th scope="col" class="sortable column-needs_update"> + <div class="text">Update?</div> +</th> +<th scope="col" class="column-days_overdue"> + <div class="text"><span>Overdue</span></div> +</th> +<th scope="col" class="column-days_overdue"> + <div class="text"><span>Edit</span></div> +</th> +</tr> +</thead> +<tbody>{% for object in object_list %} +<tr> + <td class="field-title"> + <a href="{% url 'gtd:post-detail' object.id %}">{{object.title}}</a> + </td> + <td class="field-admin_url"> + <a target="_blank" href="{{object.url}}"> + {{object.url|truncatechars:45}} + </a> + </td> + <td class="field-admin_url">{% if object.edit_url %} + <a target="_blank" href="{{object.edit_url}}"> + edit + </a>{%else%}<a href="{% url 'gtd:post-edit' object.pk %}">add</a>{%endif%} + </td> + <td class="field-date_last_pub nowrap">{{object.date_last_pub}}</td> + <td class="field-post_type"><span class="hide">{{object.post_type}}</span>{{object.get_post_type_display}}</td> + <td class="field-update_frequency">{{object.update_frequency}}</td> + <td class="field-needs_update">{% if object.needs_update %} + <span class="hide">1</span><img src="/static/admin/img/icon-yes.svg" alt="True">{%else%} + <span class="hide">0</span><img src="/static/admin/img/icon-no.svg" alt="False">{%endif%} + </td> + <td class="field-days_overdue">{{object.days_overdue}}</td> + <td class="field-days_overdue"><a href="{% url 'gtd:post-edit' object.pk %}">edit</a></td></tr> +</tr> +{% endfor %} +{% if reviews %}{% for object in reviews %} +<tr> + <td class="field-title"> + <a href="/post/{{object.id}}/notes">{{object.title}}</a> + </td> + <td class="field-admin_url"> + <a target="_blank" href="{{object.url}}"> + {{object.url|truncatechars:55}} + </a> + </td> + <td class="field-date_last_pub nowrap">{{object.date_last_pub}}</td> + <td class="field-post_type"><span class="hide">{{object.post_type}}</span>{{object.get_plan_display}}</td> + <td class="field-update_frequency">{{object.update_frequency}}</td> + <td class="field-needs_update">{% if object.needs_update %} + <span class="hide">1</span><img src="/static/admin/img/icon-yes.svg" alt="True">{%else%} + <span class="hide">0</span><img src="/static/admin/img/icon-no.svg" alt="False">{%endif%} + </td> + <td class="field-days_overdue">{{object.days_overdue}}</td> + <td class="field-days_overdue"><a href="{% url 'notes:edit' object.pk %}">edit</a></td></tr> +</tr>{% endfor %}{% endif %} +</tbody> +</table> +</div> +</main> +{% endblock %} +{% block js %} +<script src="/media/sortable.min.js"></script> +{% endblock%} |