-
Notifications
You must be signed in to change notification settings - Fork 2k
/
followee_dropdown.html
45 lines (44 loc) · 1.76 KB
/
followee_dropdown.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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" title="{{ _('Activity from:') }} {{ context.context }}">
<span>{{ _('Activity from:') }}</span>
<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}}" autocomplete="off">
</div>
</div>
{% if followees %}
<ul class="nav nav-pills nav-stacked">
<li class="everything {% if context.selected_id == False %} 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 %} data-search="{{followee.display_name|lower}}">
<a href="{{ h.url_for(controller='user', action='dashboard', type=followee.type, name=followee.dict.name) }}" title="{{followee.display_name}}">
{{followee_icon(followee.type)}}
<span>{{followee.display_name}}</span>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<p class="empty">{{ _('You are not following anything') }}</p>
{% endif %}
</form>
</div>