diff options
Diffstat (limited to 'app/gtd/templates')
-rw-r--r-- | app/gtd/templates/gtd/note_form.html | 35 | ||||
-rw-r--r-- | app/gtd/templates/gtd/note_list.html | 23 | ||||
-rw-r--r-- | app/gtd/templates/gtd/post_list.html | 25 | ||||
-rw-r--r-- | app/gtd/templates/gtd/post_table.html | 93 | ||||
-rw-r--r-- | app/gtd/templates/gtd/project_detail.html | 17 | ||||
-rw-r--r-- | app/gtd/templates/gtd/project_form.html | 35 | ||||
-rw-r--r-- | app/gtd/templates/gtd/project_list.html | 23 | ||||
-rw-r--r-- | app/gtd/templates/gtd/wirednote_form.html | 26 | ||||
-rw-r--r-- | app/gtd/templates/gtd/wirednote_list.html | 23 | ||||
-rw-r--r-- | app/gtd/templates/gtd/wiredpost_detail.html | 21 | ||||
-rw-r--r-- | app/gtd/templates/gtd/wiredpost_form.html | 16 |
11 files changed, 337 insertions, 0 deletions
diff --git a/app/gtd/templates/gtd/note_form.html b/app/gtd/templates/gtd/note_form.html new file mode 100644 index 0000000..13591e8 --- /dev/null +++ b/app/gtd/templates/gtd/note_form.html @@ -0,0 +1,35 @@ +{% extends 'base_gtd.html' %} + +{% block extrahead %} +<style> +form .selector label { + position: inherit; +} +</style> +{% endblock %} +{% block primary %} +<main role="main" class="archive-wrapper"> + <div class="post-body"> + <form action="" method="post" class="comment-form">{% csrf_token %} + {% for field in form %} + <fieldset> + {%if field.name == "project" or field.name == "status" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%} + {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%} + </fieldset> + <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small> + {%endfor%} + <input class="btn" type="submit" name="add_new" value="Save and add another" /> + <input type="submit" name="save" class="btn" value="Save" /> + </form> + </div> +</main> +{% endblock %} + {% block js %} + {% if is_update %}{%else%} +<script type="text/javascript"> +let params = new URL(document.location).searchParams; +document.getElementById('id_title').value = params.get("title"); +document.getElementById('id_body_markdown').value = params.get("description"); +</script> +{% endif %} + {% endblock%} diff --git a/app/gtd/templates/gtd/note_list.html b/app/gtd/templates/gtd/note_list.html new file mode 100644 index 0000000..2e4ea0a --- /dev/null +++ b/app/gtd/templates/gtd/note_list.html @@ -0,0 +1,23 @@ +{% extends 'base_gtd.html' %} +{% block primary %} +<main class="post-detail"> + <div class="post-header"><ul class="flex header-list"> + {% for status in note_statuses %} + <li><a class="btn" href="{% url 'gtd:note-list-status' status.1|lower%}">{{status.1}}</a></li> + {% endfor %} + <li class="right"><a href="{% url 'gtd:note-create' %}" class="btn">New Note</a></li> + </ul> + </div> + <div class="note-list">{% for object in object_list %}<article> + <h2>{{object.title}}{{object.title}}<span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span></h2> + <p>{{object.body_markdown}}</p> + <p class="small">For: <a href="/post/{{object.post.pk}}/notes">{{object.post}}</a></p> + <p class="small">Status: <a href="/post/{{object.post.pk}}/notes">{{object.get_status_display}}</a></p> + </article> +{% endfor%}</div> +</main> + + +{% endblock %} +{% block js %} +{% endblock%} diff --git a/app/gtd/templates/gtd/post_list.html b/app/gtd/templates/gtd/post_list.html new file mode 100644 index 0000000..1b56106 --- /dev/null +++ b/app/gtd/templates/gtd/post_list.html @@ -0,0 +1,25 @@ +{% extends 'base_gtd.html' %} +{%block extrahead%} +<link href="/media/sortable.min.css" rel="stylesheet" /> +{%endblock%} +{% block primary %} +<main class="content"> + <div class="narrow mtop"> + <h2>New Guides</h2> + <ul>{% for object in object_list %} + <li> + <a href="/post/{{object.id}}/notes">{{object.title}}</a> + </li>{% endfor %} + </ul> + <h2>Reviews and Raves</h2> + <ul>{% for object in reviews %} + <li> + <a href="{{object.get_absolute_url}}">{{object.title}}</a> + </li>{% endfor %} + </ul> + </div> +</main> +{% endblock %} +{% block js %} +<script src="/media/sortable.min.js"></script> +{% endblock%} 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%} diff --git a/app/gtd/templates/gtd/project_detail.html b/app/gtd/templates/gtd/project_detail.html new file mode 100644 index 0000000..bab6982 --- /dev/null +++ b/app/gtd/templates/gtd/project_detail.html @@ -0,0 +1,17 @@ +{% extends 'base_gtd.html' %} +{% load typogrify_tags %} +{% block primary %} +<main role="main" class="archive-wrapper"> + <div class="post-body"> + <h2>Project: {{object.title}}</h2> + {{object.body_html|smartypants|safe}} + <h3>Actions</h3> + {% for object in object.gtdnote_set.all %} + <h4>{{object.title}} <span class="note-edit"><a href="{%url 'gtd:note-edit' object.pk%}">edit</a></span></h4> + {{object.body_html|smartypants|safe}} + {% endfor %} + </div> +</main> +{% endblock %} + {% block js %} + {% endblock%} diff --git a/app/gtd/templates/gtd/project_form.html b/app/gtd/templates/gtd/project_form.html new file mode 100644 index 0000000..ac7d13f --- /dev/null +++ b/app/gtd/templates/gtd/project_form.html @@ -0,0 +1,35 @@ +{% extends 'base_gtd.html' %} + +{% block extrahead %} +<style> +form .selector label { + position: inherit; +} +</style> +{% endblock %} +{% block primary %} +<main role="main" class="archive-wrapper"> + <div class="post-body"> + <form action="" method="post" class="comment-form">{% csrf_token %} + {% for field in form %} + <fieldset> + {%if field.name == "project_type" or field.name == "outcome" or field.name == 'note_type'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%} + {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%} + </fieldset> + <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small> + {%endfor%} + <input class="btn" type="submit" name="add_new" value="Save and add another" /> + <input type="submit" name="save" class="btn" value="Save" /> + </form> + </div> +</main> +{% endblock %} + {% block js %} + {% if is_update %}{%else%} +<script type="text/javascript"> +let params = new URL(document.location).searchParams; +document.getElementById('id_title').value = params.get("title"); +document.getElementById('id_body_markdown').value = params.get("description"); +</script> +{% endif %} + {% endblock%} diff --git a/app/gtd/templates/gtd/project_list.html b/app/gtd/templates/gtd/project_list.html new file mode 100644 index 0000000..a37f4e8 --- /dev/null +++ b/app/gtd/templates/gtd/project_list.html @@ -0,0 +1,23 @@ +{% extends 'base_gtd.html' %} +{% block primary %} +<main class="post-detail"> + <div class="post-header"><ul class="flex header-list"> + {% for status in note_statuses %} + <li><a class="btn" href="{% url 'gtd:note-list-status' status.1|lower%}">{{status.1}}</a></li> + {% endfor %} + <li class="right"><a href="{% url 'gtd:note-create' %}" class="btn">New Note</a></li> + </ul> + </div> + <div class="note-list">{% for object in object_list %}<article> + <h2>{{object.title}}<span class="note-edit"><a href="{% url 'gtd:project-edit' object.pk %}">edit</a></span></h2> + <p>{{object.body_markdown}}</p> + <p class="small">Date Goal: {{object.date_goal}}</p> + <p class="small">Type: {{object.get_project_type_display}}</p> + </article> +{% endfor%}</div> +</main> + + +{% endblock %} +{% block js %} +{% endblock%} diff --git a/app/gtd/templates/gtd/wirednote_form.html b/app/gtd/templates/gtd/wirednote_form.html new file mode 100644 index 0000000..92b8230 --- /dev/null +++ b/app/gtd/templates/gtd/wirednote_form.html @@ -0,0 +1,26 @@ +{% extends 'base_gtd.html' %} +{% block primary %} +<main role="main" class="archive-wrapper"> + <form action="" method="post" class="comment-form">{% csrf_token %} + {% for field in form %} + <fieldset> + {%if field.name == "post" or field.name == "status" or field.name == 'plan'%}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%} + {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%} + </fieldset> + <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small> + {%endfor%} + <input class="btn" type="submit" name="add_new" value="Save and add another" /> + <input type="submit" name="save" class="btn" value="Save" /> + </form> +</main> +{% endblock %} + {% block js %} + {% if is_update %}{%else%} +<script type="text/javascript"> +let params = new URL(document.location).searchParams; +document.getElementById('id_title').value = params.get("title"); +document.getElementById('id_url').value = params.get("url"); +document.getElementById('id_body_markdown').value = params.get("description"); +</script> +{% endif %} + {% endblock%} diff --git a/app/gtd/templates/gtd/wirednote_list.html b/app/gtd/templates/gtd/wirednote_list.html new file mode 100644 index 0000000..7b17617 --- /dev/null +++ b/app/gtd/templates/gtd/wirednote_list.html @@ -0,0 +1,23 @@ +{% extends 'base_gtd.html' %} +{% block primary %} +<main class="post-detail"> + <div class="post-header"><ul class="flex header-list"> + {% for status in note_statuses %} + <li><a class="btn" href="{% url 'gtd:wirednote-list' status.1|lower%}">{{status.1}}</a></li> + {% endfor %} + <li class="right"><a href="{% url 'gtd:wirednote-create' %}" class="btn">New Note</a></li> + </ul> + </div> + <div class="note-list">{% for object in object_list %}<article> + <h2>{%if object.url%}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%}<span class="note-edit"><a href="{{object.get_absolute_url}}">edit</a></span></h2> + <p>{{object.body_markdown}}</p> + <p class="small">For: <a href="/post/{{object.post.pk}}/notes">{{object.post}}</a></p> + <p class="small">Status: <a href="/post/{{object.post.pk}}/notes">{{object.get_status_display}}</a></p> + </article> +{% endfor%}</div> +</main> + + +{% endblock %} +{% block js %} +{% endblock%} diff --git a/app/gtd/templates/gtd/wiredpost_detail.html b/app/gtd/templates/gtd/wiredpost_detail.html new file mode 100644 index 0000000..92ac269 --- /dev/null +++ b/app/gtd/templates/gtd/wiredpost_detail.html @@ -0,0 +1,21 @@ +{% extends 'base_gtd.html' %} +{% block primary %} +<main class="post-detail"> + <div class="post-header"> +<h1><a href="{{object.url}}">{{object.title}}</a></h1> +<p>Last Updated: {{object.date_last_pub}}</p> +<p>Needs Update: {% if object.needs_update %} Yes {% if object.days_overdue %}{{object.days_overdue}} days overdue{%endif %}{%endif%}</p> + </div>{% regroup notes by get_status_display as newlist %} + <div class="note-list">{% for obj in newlist %} + <h5>{{obj.grouper}}</h5> + {% for object in obj.list %} + <article> + <h2>{%if object.url%}<a href="{{object.url}}">{{object.title}}</a>{%else%}{{object.title}}{%endif%}<span class="note-edit"><a href="{{object.get_absolute_url}}">edit</a></span></h2> + <p>{{object.body_markdown}}</p> + <p>Status: {% if object.status == 0 %}<span class="alert">{{object.get_status_display}}</span>{%else%}{{object.get_status_display}}{%endif%}</p> + </article>{%endfor%} +{% endfor%}</div> +</main> +{% endblock %} + {% block js %} + {% endblock%} diff --git a/app/gtd/templates/gtd/wiredpost_form.html b/app/gtd/templates/gtd/wiredpost_form.html new file mode 100644 index 0000000..a9880cf --- /dev/null +++ b/app/gtd/templates/gtd/wiredpost_form.html @@ -0,0 +1,16 @@ +{% extends 'base_gtd.html' %} +{% block primary %} +<main role="main" class="archive-wrapper"> + <form action="" method="post" class="comment-form">{% csrf_token %} + {% for field in form %} + <fieldset> + {%if field.name == "guide_type" or field.name == "post_status" or field.name == "template_type" %}<span class="selector">{{field.label_tag}}</span>{%else%}{{field.label_tag}}{%endif%} + {%if field.name == "body_markdown"%}<div class="textarea-rounded">{{ field }}</div>{%else%}{{field}}{%endif%} + </fieldset> + <small class="alert">{% if field.errors %}{{field.errors}}{% endif %}</small> + {%endfor%} + <input class="btn" type="submit" name="add_new" value="Save and add another" /> + <input type="submit" name="save" class="btn" value="Save" /> + </form> +</main> +{% endblock %} |