-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_resourcebase_snippet.html
105 lines (96 loc) · 5.31 KB
/
_resourcebase_snippet.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{% load i18n %}
{% verbatim %}
<div class="row resourcebase-snippet">
<div ng-if="results.length == 0" ng-cloak>
{% endverbatim %}
<div><h3>{% trans "No content created yet." %}</h3></div>
{% verbatim %}
</div>
<article ng-repeat="item in results" resource_id="{{ item.id }}" ng-cloak class="ng-cloak">
<div class="col-lg-6 item-container">
<div class="col-lg-12 profile-avatar">
<div class="row">
<div class="col-md-12">
<div class="col-lg-4 item-thumb">
<a href="{{ item.detail_url }}">
<img ng-src="{{ item.thumbnail_url }}" />
</a>
</div>
<div class="col-lg-8 item-details">
<div class="row">
<div class="col-xs-10">
<p class="item-meta">
<span class="item-category">{{ item.category__gn_description }}</span><br>
<span class="item-category" ng-if="item.group"><a href="{{ item.site_url }}groups/group/{{ item.group }}/activity/"><i class="fa fa-group" aria-hidden="true" style="margin-right: 8px;"></i>{{ item.group_name }}</a><br></span>
<span class="item-category" ng-if="item.has_time">
{% endverbatim %}
<i class="fa fa-clock-o" aria-hidden="true" style="margin-right: 8px;"></i>{% trans "Temporal Serie" %}<br>
{% verbatim %}
</span>
</p>
<h4>
<i ng-if="item.store_type == 'remoteStore'" title="Remote Service" class="fa fa-external-link fa-1" style="vertical-align: middle;padding-right: 10px;"></i>
<i ng-if="item.store_type == 'dataStore'" title="Vector Data" class="fa fa-pencil-square-o fa-1" style="vertical-align: middle;padding-right: 10px;"></i>
<i ng-if="item.store_type == 'coverageStore'" title="Raster Data" class="fa fa-picture-o fa-1" style="vertical-align: middle;padding-right: 10px;"></i>
<i ng-if="item.store_type == 'dataset'" title="File/Dataset" class="fa fa-newspaper-o fa-1" style="vertical-align: middle;padding-right: 10px;"></i>
<i ng-if="item.store_type == 'map'" title="Map" class="fa fa-map-o fa-1" style="vertical-align: middle;padding-right: 10px;"></i>
<a href="{{ item.detail_url }}">{{ item.title }}</a>
</h4>
</div>
<div class="col-xs-2">
<h4>
<button
class="btn btn-default btn-xs pull-right"
ng-if="cart"
ng-click="cart.toggleItem(item)"
data-toggle="tooltip"
data-placement="bottom"
title="Select"><i ng-class="cart.getFaClass(item.id)" class="fa fa-lg"></i></button>
</h4>
</div>
</div>
<em ng-if="item.online && item.store_type == 'remoteStore'">
{% endverbatim %}
<span ng-if="item.online == true"><i class="fa fa-power-off text-success"></i> {% trans "Service is" %} {% trans "online" %}</span>
<span ng-if="item.online == false"><i class="fa fa-power-off text-danger"></i> {% trans "Service is" %} {% trans "offline" %}</span>
{% verbatim %}
</em>
{% endverbatim %}
<div class="alert alert-danger" ng-if="item.dirty_state == true">{% trans "SECURITY NOT YET SYNCHRONIZED" %}</div>
<div class="alert alert-warning" ng-if="item.dirty_state == false && item.is_approved == false">{% trans "PENDING APPROVAL" %}</div>
<div class="alert alert-danger" ng-if="item.dirty_state == false && item.is_approved == true && item.is_published == false">{% trans "UNPUBLISHED" %}</div>
{% verbatim %}
<p class="abstract">{{ item.abstract | limitTo: 300 }}{{ item.abstract.length > 300 ? '...' : ''}}</p>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-lg-12 item-items">
<hr>
<ul class="list-inline">
<!-- <li><a href="{{ item.site_url }}people/profile/{{ item.owner__username }}"><i class="fa fa-user"></i>{{ item.owner_name }}</a></li> -->
<li><a href="{{ item.detail_url }}#info"><i class="fa fa-calendar-o"></i>{{ item.date|date:'d MMM y' }}</a></li>
<li><a href="{{ item.detail_url }}"><i class="fa fa-eye"></i>{{ item.popular_count }}</a></li>
<li><a href="{{ item.detail_url }}#share"><i class="fa fa-share"></i>{{ item.share_count }}</a></li>
<li><a href="{{ item.detail_url }}#rate"><i class="fa fa-star"></i>{{ item.rating }}</a></li>
<li><a ng-if="item.detail_url.indexOf('/layers/') > -1" href="{% endverbatim %}{% url "new_map" %}?layer={% verbatim %}{{ item.detail_url.substring(8) }}">
{% endverbatim %}
<i class="fa fa-map-marker"></i>{% trans "Create a Map" %}</a>
{% verbatim %}
</li>
<li><a ng-if="item.detail_url.indexOf('/maps/') > -1" href="{{ item.site_url }}maps/{{item.id}}/view">
{% endverbatim %}
<i class="fa fa-map-marker"></i>{% trans "View Map" %}</a>
{% verbatim %}
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</article>
</div>
{% endverbatim %}