summaryrefslogtreecommitdiff
path: root/templates/index.html
blob: b809faf4a2927ed82f451986c181f79898c77212 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{% extends 'base.html' %}
{% block content %}
    {% if is_guest %}
        Welcome Guest<br>
        <a href="/accounts/register/">Register</a>
        <a href="/accounts/login/">Login</a><br /><br />
        Recent Tasks:<br />
        {% for task in task_list %}
            <a href="/task/view/tid={{ task.id }}">{{ task.title }}</a><br />
        {% endfor %}
    {% else %}
        Logged in as {{ user.username }} <br /><br />
    {% endif %}

    {% if can_create_task %}
        <a href="/task/create/">Create a task</a><br />
    <br />
    {% endif %}
    {% ifequal user.get_profile.rights "MG" %}
        <a href="/user/make/dv/">Request another user to be a Developer</a><br />
        <a href="/user/make/mg/">Request another user to act as manager</a><br />
    <br />
    {% endifequal %}
    {% ifequal user.get_profile.rights "AD" %}
        <a href="/user/make/dv/">Request another user to be a Developer</a><br />
        <a href="/user/make/mg/">Request another user to act as a Manager</a><br />
        <a href="/user/make/ad">Request another user to act as an Admin</a><br />
    <br />
    {% endifequal %}
    

    {% if user.unread_notifications.count %}
        You have {{ user.unread_notifications.count }} <a href='/user/notifications/'>unread</a>
        {% ifnotequal user.unread_notifications.count 1 %}
        notifications
        {% else %}
        notification
        {% endifnotequal %}
    <br />
    {% endif %}

    {% if user.unread_requests.count %}
        You have {{ user.unread_requests.count }}  <a href='/user/requests/'>unread</a>
        {% ifnotequal user.unread_requests.count 1 %}
        requests
        {% else %}
        request
        {% endifnotequal %}
    <br /><br />
    {% else %}
        {% if user.unread_notifications.count %}
            <br />
        {% endif %}
    {% endif %}
    
    
<!--
    {% if user.task_claimed_users.count %}
        {{ user.task_claimed_users.count }} <a href='/user/claimed/'>claimed</a>
        {% ifnotequal user.task_claimed_users.count 1 %}
        tasks
        {% else %}
        task
        {% endifnotequal %}<br />
    {% endif %}
    
    {% if user.task_assigned_users.count %}
        You are currently <a href='/user/assigned/'>working</a> on {{ user.task_assigned_users.count }}
        {% ifnotequal user.task_assigned_users.count 1 %}
        tasks
        {% else %}
        task
        {% endifnotequal %}<br />
    {% endif %}
    
    {% if user.task_mentors.count %}
        <a href="/user/mentor/">Mentoring {{ user.task_mentors.count }}
        {% ifnotequal user.task_mentors.count 1 %}
            tasks
        {% else %}
            task
        {% endifnotequal %}</a>
        <br />
    {% endif %}
    
    -->
    
    {% if unpublished_tasks %}
    Unpublished tasks viewable by you:<ul>
        {% for a_task in unpublished_tasks %}
            <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
        {% endfor %}
        </ul>
    <br />
    {% endif %}

    {% if mentored_tasks %}
    Tasks you are mentoring:<ul>
        {% for a_task in mentored_tasks %}
            <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
        {% endfor %}
        </ul>
    <br />
    {% endif %}

    {% if working_tasks %}
    Tasks that have been assigned to you:<ul>
        {% for a_task in working_tasks %}
            <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
        {% endfor %}
        </ul>
    <br />
    {% endif %}

    {% if claimed_tasks %}
    Tasks claimed but still not assigned to you:<ul>
        {% for a_task in claimed_tasks %}
            <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
        {% endfor %}
        </ul>
    <br />
    {% endif %}

{% endblock %}