-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3028] Snippetized followee dropdown and added context to dashboard …
…when filtering
- Loading branch information
1 parent
080cef4
commit 6ef49b7
Showing
7 changed files
with
105 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{%if type == 'user' %} | ||
<h2>{{ dict.name }}</h2> | ||
{% snippet 'ajax_snippets/popover-context-user.html', id=dict.id, name=dict.name, about=dict.about, is_me='false', num_followers=dict.num_followers, number_administered_packages=dict.number_administered_packages, number_of_edits=dict.number_of_edits %} | ||
{%elif type == 'dataset' %} | ||
<h2>{{ dict.title }}</h2> | ||
{% snippet 'ajax_snippets/popover-context-dataset.html', id=dict.id, name=dict.name, notes=dict.notes, num_resources=dict.num_resources, num_tags=dict.num_tags %} | ||
{%elif type == 'group' %} | ||
<h2>{{ dict.title }}</h2> | ||
{% snippet 'ajax_snippets/popover-context-group.html', id=dict.id, name=dict.name, description=dict.description, num_followers=dict.num_followers, num_datasets=dict.num_datasets %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{% macro followee_icon(type) -%} | ||
{% if type == 'dataset' %} | ||
<i class="icon-sitemap"></i> | ||
{% elif type == 'user' %} | ||
<i class="icon-user"></i> | ||
{% elif type == 'group' %} | ||
<i class="icon-group"></i> | ||
{% endif %} | ||
{%- endmacro %} | ||
|
||
<div id="followee-filter" class="pull-right"> | ||
<a href="#followee-popover" class="btn"> | ||
{{ _('Show me:') }} | ||
<strong>{{ context.context }}</strong> | ||
<span class="caret"></span> | ||
</a> | ||
<form id="followee-popover" action="/dashboard" class="dropdown js-hide"> | ||
<div class="popover-header"> | ||
<div class="input-prepend"> | ||
<span class="add-on"><i class="icon-search"></i></span> | ||
<input type="text" name="q" placeholder="{{ _('Search list...') }}" value="{{context.q}}"> | ||
</div> | ||
</div> | ||
{% if followees %} | ||
<ul class="nav nav-pills nav-stacked"> | ||
<li{% if context.selected_id == False %} class="active"{% endif %}> | ||
<a href="{{ h.url_for(controller='user', action='dashboard') }}"> | ||
<i class="icon-star"></i> | ||
<span>Everything</span> | ||
</a> | ||
</li> | ||
{% for followee in followees %} | ||
<li{% if context.selected_id == followee.dict.id %} class="active"{% endif %}> | ||
<a href="{{ h.url_for(controller='user', action='dashboard', type=followee.type, name=followee.dict.name) }}"> | ||
{{followee_icon(followee.type)}} | ||
<span>{{followee.display_name}}</span> | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<p class="empty">{{ _('You currently not following anything') }}</p> | ||
{% endif %} | ||
</form> | ||
</div> |