/
show.html.erb
134 lines (134 loc) · 5.42 KB
/
show.html.erb
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<div class="page-header" id="headline">
<h3><%= t('.headline', city_short: Settings::Client.city_short) %></h3>
</div>
<div class="row">
<div class="col-md-3">
<div class="panel panel-info">
<div class="panel-heading">
<h5 class="panel-title">
<%= t('.recent_requests') %>
<%= link_to [:observations, format: :xml], target: '_blank', title: t('.subscribe_requests_feed') do %>
<%= image_tag('rss.png', class: 'img-margin-bottom') %>
<% end -%>
</h5>
</div>
<div class="panel-body requests-img-panel">
<% @requests.each.with_index(1) do |req, i| -%>
<% if i.odd? -%>
<div class="row form-group">
<div class="col-md-6">
<%= link_to [:map, request: req.id], title: t('buttons.perma_link', req_id: req.id),
data: { turbolinks: false } do %>
<% if (url = req.media_url).present? -%>
<div class="img-box img-rounded" style="background-image: url('<%= url %>')">
<span class="img-overlay-top">#<%= req.id %><br/><%= req.service.to_s.gsub(/\//, '/ ') %></span>
<span class="img-overlay-bottom"><%= image_tag req.icon_list %></span>
</div>
<% end -%>
<% end -%>
</div>
<% else -%>
<div class="col-md-6">
<%= link_to [:map, request: req.id], title: t('buttons.perma_link', req_id: req.id),
data: { turbolinks: false } do %>
<% if (url = req.media_url).present? -%>
<div class="img-box img-rounded" style="background-image: url('<%= url %>')">
<span class="img-overlay-top">#<%= req.id %><br/><%= req.service.to_s.gsub(/\//, '/ ') %></span>
<span class="img-overlay-bottom"><%= image_tag req.icon_list %></span>
</div>
<% end -%>
<% end -%>
</div>
</div>
<% end -%>
<% end -%>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel panel-info start-panel">
<div class="panel-heading">
<h5 class="panel-title"><%= t('.what_is_it', name: Settings::Client.name) %></h5>
</div>
<div class="panel-body">
<div class="row form-group">
<div class="col-md-12">
<p><%= t('.start_content_one', name: Settings::Client.name, city_long: Settings::Client.city_long) %></p>
<p><%= t('.start_content_two', name: Settings::Client.name) %></p>
<p><%= t('.start_content_three') %></p>
</div>
</div>
<div class="row">
<div class="col-md-8 text-center">
<%= link_to t('buttons.requests'), [:map], role: :button, class: 'btn btn-lg btn-primary most-important', data: { turbolinks: false } %>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h5 class="panel-title"><%= t('.what_is_it_not', name: Settings::Client.name) %></h5>
</div>
<div class="panel-body">
<p><%= t('.not_content_one_html') %></p>
<p><%= t('.not_content_two_html', :href => link_to(t('.not_content_two_href'), Settings::Url.not_content_two_url, target: '_blank')) %></p>
<p><%= t('.not_content_three_html', :href => link_to(t('.not_content_three_href'), Settings::Url.not_content_three_url, target: '_blank')) %></p>
</div>
</div>
<div id="statistic-panel" class="panel panel-info">
<div class="panel-heading">
<h5 class="panel-title"><%= t('.statistics') %></h5>
</div>
<div class="panel-body">
<div class="col-md-3">
<div class="statistic-box">
<div class="statistic-box-figure">
<span class="label label-warning"><%= @overall_count %></span>
</div>
<div class="statistic-box-text">
<%= t('.overall', start_date: Settings::Client.start_date) %>
</div>
</div>
</div>
<div class="col-md-3">
<div class="statistic-box">
<div class="statistic-box-figure">
<span class="label label-warning"><%= @current_count %></span>
</div>
<div class="statistic-box-text">
<%= t('.current') %>
</div>
</div>
</div>
<div class="col-md-3">
<div class="statistic-box">
<div class="statistic-box-figure">
<span class="label label-warning"><%= @newest_count %></span>
</div>
<div class="statistic-box-text">
<%= t('.newest') %>
</div>
</div>
</div>
<div class="col-md-3">
<div class="statistic-box">
<div class="statistic-box-figure">
<span class="label label-warning"><%= @processed_count %></span>
</div>
<div class="statistic-box-text">
<%= t('.processed') %>
</div>
</div>
</div>
</div>
</div>
<div id="news-panel" class="panel panel-info">
<div class="panel-heading">
<h5 class="panel-title"><%= t('.news') %></h5>
</div>
<ul class="list-group">
<%= render file: "#{ Settings::Client.resources_path }/neuigkeiten.html" %>
</ul>
</div>
</div>
</div>