summaryrefslogtreecommitdiff
path: root/app/notes/templates/note_list.html
blob: 1439f4a1c30653e8415dfc7411ac5b8c4584b4dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends 'base_notes.html' %}
{% block primary %}
<main class="post-detail">
    <div class="post-header"><ul class="flex header-list">
        <li><a class="btn" href="{% url 'notes:note-list' %}">All</a></li>
        {% for object in note_types %}
        <li><a class="btn" href="{% url 'gtd:note-list-status' object.label|lower%}">{{object.label}}</a></li>
        {% endfor %}
        <li class="right"><a href="{% url 'notes:note-create' %}" class="btn">New Note</a></li>
        </ul>

<select class="form-control" style="margin-top: 2%;" onchange="go_from_select(this.options[this.selectedIndex].value)">
    <option value="">All Projects</option>{% for object in tags %}
    <option {% if current == object.name %}selected="selected" {%endif%}value="?tag={{object}}">{{object}}</option>{%endfor%}
</select> 
    </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="{%url 'notes:note-edit' object.id %}">edit</a></span></h2>
    <p>{{object.description}}</p>
    {% if object.project %}<p class="small">For: <a href="{% url 'notes:project-detail' object.project.id %}">{{object.project}}</a></p>{%endif%}
    <p class="small"><a href="{% url 'notes:note-detail' object.pk %}">View local</a></p>
    <p class="small"><a href="{% url 'notes:note-delete' object.pk %}">delete</a></p>
        </article>
{% endfor%}</div>
</main>


{% endblock %}
{% block js %}
<script type="text/javascript">var go_from_select = function(opt) { window.location = window.location.pathname + opt };</script>
{% endblock%}