{% extends 'base.html' %}
{% block content %}
    {% if is_guest %}
        Welcome Guest
        Register
        Login
        Recent Tasks:
        {% for task in task_list %}
            {{ task.title }}
        {% endfor %}
    {% else %}
        Logged in as {{ user.username }} 
    {% endif %}
    {% if can_create_task %}
        Create a task
    
    {% endif %}
    {% ifequal user.get_profile.rights "MG" %}
        Request another user to be a Developer
        Request another user to act as manager
    
    {% endifequal %}
    {% ifequal user.get_profile.rights "AD" %}
        Request another user to be a Developer
        Request another user to act as a Manager
        Request another user to act as an Admin
    
    {% endifequal %}
    
    {% if user.unread_notifications.count %}
        You have {{ user.unread_notifications.count }} unread
        {% ifnotequal user.unread_notifications.count 1 %}
        notifications
        {% else %}
        notification
        {% endifnotequal %}
    
    {% endif %}
    {% if user.unread_requests.count %}
        You have {{ user.unread_requests.count }}  unread
        {% ifnotequal user.unread_requests.count 1 %}
        requests
        {% else %}
        request
        {% endifnotequal %}
    
    {% else %}
        {% if user.unread_notifications.count %}
            
        {% endif %}
    {% endif %}
    
    
    
    {% if unpublished_tasks %}
    Unpublished tasks viewable by you: