Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Merge pull request #143 from bitgeeky/ImproveDisplay
Browse files Browse the repository at this point in the history
Bug 1031196 - Improve Display for Profile Details Page
  • Loading branch information
bobsilverberg committed Jun 28, 2014
2 parents e67fe32 + 1a50f8e commit 0664581
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
10 changes: 6 additions & 4 deletions oneanddone/base/templates/base/dashboard.html
Expand Up @@ -22,9 +22,11 @@ <h4>{{ _('Tasks in progress') }}</h4>

</section>

<nav class="actions-container">
{% if not user.attempts_in_progress %}
<a href="{{ url('tasks.available') }}" class="button" id="pick-a-task">{{ _('Pick a task to do') }}</a>
{% if not page == 'ProfileDetails' %}
<nav class="actions-container">
{% if not user.attempts_in_progress %}
<a href="{{ url('tasks.available') }}" class="button" id="pick-a-task">{{ _('Pick a task to do') }}</a>
{% endif %}
</nav>
{% endif %}
</nav>
</section>
12 changes: 8 additions & 4 deletions oneanddone/users/templates/users/profile/detail.html
Expand Up @@ -6,17 +6,18 @@
{% set title = _('User profile for {username}')|f(username=user.profile.name) %}

{% block content %}
<h1><span id="user-profile-name">{{ _("{name}")|fe(name=user.profile.name) }}</span>{{_("'s Profile")}}</h1>

<main class="billboard content-container">
<h1><span id="user-profile-name">{{ _("{name}")|fe(name=user.profile.name) }}</span>{{_("'s Profile")}}</h1>
{% include 'base/dashboard.html' %}

<main class="billboard content-container">
<div class="billboard content-container">

<section class="task-status">

<h4>
<span id="completed-tasks-count">{{ _('{count}')|f(count=user.attempts_finished_count) }}</span>
{{ ngettext('task completed', 'tasks completed', attempts_finished)}}
{{ ngettext('Task Completed', 'Tasks Completed', attempts_finished)}}
</h4>
<ul>
{% for attempt in attempts_finished %}
Expand All @@ -29,9 +30,12 @@ <h4>

</section>

</div>
<div class="actions-container">
{% if not user.attempts_in_progress %}
<a href="{{ url('tasks.available') }}" class="button" id="pick-a-task">{{ _('Pick a task to do') }}</a>
{% endif %}
<a href="{{ url('users.profile.update') }}" id="edit-profile" class="button">{{ _('Edit profile') }}</a>
</div>

</main>
{% endblock %}
1 change: 1 addition & 0 deletions oneanddone/users/views.py
Expand Up @@ -132,6 +132,7 @@ def get_context_data(self, **kwargs):

context = super(ProfileDetailsView, self).get_context_data(**kwargs)
context['attempts_finished'] = attempts_finished
context['page'] = 'ProfileDetails'
return context


Expand Down

0 comments on commit 0664581

Please sign in to comment.