templates/index.html
author nishanth
Sun, 28 Feb 2010 04:17:15 +0530
changeset 139 56203661002a
parent 125 d3cfceb8e120
child 141 2489392ffb56
permissions -rw-r--r--
provided links to make a raise the privileges of a user.

{% 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 />
    {% endif %}
    
    {% if notifications.count %}
        You have {{ notifications.count }} <a href='/user/notifications/'>unread</a>
        {% ifnotequal notifications.count 1 %}
        notifications
        {% else %}
        notification
        {% endifnotequal %}<br />
    {% endif %}
    
    {% if requests.count %}
        You have {{ requests.count }}  <a href='/user/requests/'>unreplied</a>
        {% ifnotequal requests.count 1 %}
        requests
        {% else %}
        request
        {% endifnotequal %}<br />
    {% 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 %}
    <br />Unpublished tasks viewable by you:<br />
        {% for a_task in unpublished_tasks %}
            <a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a>&nbsp;&nbsp;&nbsp;
        {% endfor %}
    {% endif %}
    <br /><br />
    {% ifnotequal user.get_profile.rights "CT" %}
        <a href="/task/create/">Create a task</a><br />
    {% endifnotequal %}
    {% ifequal user.get_profile.rights "MG" %}
        <a href="/user/make/dv/">Request another to be a Developer</a>
        <a href="/user/make/mg/">Request another user to act as manager</a><br />
    {% endifequal %}
    {% ifequal user.get_profile.rights "AD" %}
        <a href="/user/make/dv/">Request another 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 />
    {% endifequal %}
{% endblock %}