View the given task

        :param task: the task to view
        :type task: :class:`jukeboxcore.djadapter.models.Task`
        :returns: None
        :rtype: None
        :raises: None

def view_task(self, task):
        """View the given task

        :param task: the task to view
        :type task: :class:`jukeboxcore.djadapter.models.Task`
        :returns: None
        :rtype: None
        :raises: None
        """
        log.debug('Viewing task %s', task.name)
        self.cur_task = None
        self.pages_tabw.setCurrentIndex(7)

        self.task_dep_le.setText(task.name)
        statusmap = {"New": 0, "Open": 1, "Done":2}
        self.task_status_cb.setCurrentIndex(statusmap.get(task.status, -1))
        dt = dt_to_qdatetime(task.deadline) if task.deadline else None
        self.task_deadline_de.setDateTime(dt)

        self.task_link_le.setText(task.element.name)

        userrootdata = treemodel.ListItemData(['Username', 'First', 'Last', 'Email'])
        userrootitem = treemodel.TreeItem(userrootdata)
        for user in task.users.all():
            userdata = djitemdata.UserItemData(user)
            treemodel.TreeItem(userdata, userrootitem)
        self.task_user_model = treemodel.TreeModel(userrootitem)
        self.task_user_tablev.setModel(self.task_user_model)

        self.cur_task = task