templates/index.html
branchbuildout
changeset 227 3c8f3b0e5b00
parent 214 679c7e237052
child 228 81994e525e69
equal deleted inserted replaced
214:679c7e237052 227:3c8f3b0e5b00
     1 {% extends 'base.html' %}
       
     2 {% block content %}
       
     3     {% if is_guest %}
       
     4         Welcome Guest<br>
       
     5         <a href="/accounts/register/">Register</a>
       
     6         <a href="/accounts/login/">Login</a><br /><br />
       
     7         Recent Tasks:<br />
       
     8         {% for task in task_list %}
       
     9             <a href="/task/view/tid={{ task.id }}">{{ task.title }}</a><br />
       
    10         {% endfor %}
       
    11     {% else %}
       
    12         Logged in as {{ user.username }} <br /><br />
       
    13     {% endif %}
       
    14 
       
    15     {% if can_create_task %}
       
    16         <a href="/task/create/">Create a task</a><br />
       
    17     <br />
       
    18     {% endif %}
       
    19     {% ifequal user.get_profile.rights "MG" %}
       
    20         <a href="/user/make/dv/">Request another user to be a Developer</a><br />
       
    21         <a href="/user/make/mg/">Request another user to act as manager</a><br />
       
    22     <br />
       
    23     {% endifequal %}
       
    24     {% ifequal user.get_profile.rights "AD" %}
       
    25         <a href="/user/make/dv/">Request another user to be a Developer</a><br />
       
    26         <a href="/user/make/mg/">Request another user to act as a Manager</a><br />
       
    27         <a href="/user/make/ad">Request another user to act as an Admin</a><br />
       
    28     <br />
       
    29     {% endifequal %}
       
    30     
       
    31 
       
    32     {% if user.unread_notifications.count %}
       
    33         You have {{ user.unread_notifications.count }} <a href='/user/notifications/'>unread</a>
       
    34         {% ifnotequal user.unread_notifications.count 1 %}
       
    35         notifications
       
    36         {% else %}
       
    37         notification
       
    38         {% endifnotequal %}
       
    39     <br />
       
    40     {% endif %}
       
    41 
       
    42     {% if user.unread_requests.count %}
       
    43         You have {{ user.unread_requests.count }}  <a href='/user/requests/'>unread</a>
       
    44         {% ifnotequal user.unread_requests.count 1 %}
       
    45         requests
       
    46         {% else %}
       
    47         request
       
    48         {% endifnotequal %}
       
    49     <br /><br />
       
    50     {% else %}
       
    51         {% if user.unread_notifications.count %}
       
    52             <br />
       
    53         {% endif %}
       
    54     {% endif %}
       
    55     
       
    56     
       
    57 <!--
       
    58     {% if user.task_claimed_users.count %}
       
    59         {{ user.task_claimed_users.count }} <a href='/user/claimed/'>claimed</a>
       
    60         {% ifnotequal user.task_claimed_users.count 1 %}
       
    61         tasks
       
    62         {% else %}
       
    63         task
       
    64         {% endifnotequal %}<br />
       
    65     {% endif %}
       
    66     
       
    67     {% if user.task_assigned_users.count %}
       
    68         You are currently <a href='/user/assigned/'>working</a> on {{ user.task_assigned_users.count }}
       
    69         {% ifnotequal user.task_assigned_users.count 1 %}
       
    70         tasks
       
    71         {% else %}
       
    72         task
       
    73         {% endifnotequal %}<br />
       
    74     {% endif %}
       
    75     
       
    76     {% if user.task_mentors.count %}
       
    77         <a href="/user/mentor/">Mentoring {{ user.task_mentors.count }}
       
    78         {% ifnotequal user.task_mentors.count 1 %}
       
    79             tasks
       
    80         {% else %}
       
    81             task
       
    82         {% endifnotequal %}</a>
       
    83         <br />
       
    84     {% endif %}
       
    85     
       
    86     -->
       
    87     
       
    88     {% if unpublished_tasks %}
       
    89     Unpublished tasks viewable by you:<ul>
       
    90         {% for a_task in unpublished_tasks %}
       
    91             <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
       
    92         {% endfor %}
       
    93         </ul>
       
    94     <br />
       
    95     {% endif %}
       
    96 
       
    97     {% if mentored_tasks %}
       
    98     Tasks you are mentoring:<ul>
       
    99         {% for a_task in mentored_tasks %}
       
   100             <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
       
   101         {% endfor %}
       
   102         </ul>
       
   103     <br />
       
   104     {% endif %}
       
   105 
       
   106     {% if working_tasks %}
       
   107     Tasks that have been assigned to you:<ul>
       
   108         {% for a_task in working_tasks %}
       
   109             <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
       
   110         {% endfor %}
       
   111         </ul>
       
   112     <br />
       
   113     {% endif %}
       
   114 
       
   115     {% if claimed_tasks %}
       
   116     Tasks claimed but still not assigned to you:<ul>
       
   117         {% for a_task in claimed_tasks %}
       
   118             <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li>
       
   119         {% endfor %}
       
   120         </ul>
       
   121     <br />
       
   122     {% endif %}
       
   123 
       
   124 {% endblock %}