-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
_info.html.erb
71 lines (58 loc) · 2.1 KB
/
_info.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
<div class="proposal-info">
<%= render "/shared/author_info", resource: @proposal %>
<span class="bullet"> • </span>
<%= l @proposal.created_at.to_date %>
<span class="bullet"> • </span>
<span class="icon-comments"></span>
<%= link_to t("proposals.show.comments", count: @proposal.comments_count), "#comments" %>
<% if current_user %>
<span class="bullet"> • </span>
<span class="js-flag-actions">
<%= render "proposals/flag_actions", proposal: @proposal %>
</span>
<% end %>
</div>
<%= render_image(@proposal.image, :large, true) if @proposal.image.present? %>
<br>
<p>
<%= t("proposals.show.code") %>
<strong><%= @proposal.code %></strong>
</p>
<blockquote><%= @proposal.summary %></blockquote>
<% if @proposal.video_url.present? %>
<div class="small-12 medium-7 small-centered">
<div class="flex-video">
<div id="js-embedded-video" data-video-code="<%= embedded_video_code %>"></div>
</div>
</div>
<% end %>
<%= safe_html_with_links @proposal.description %>
<% if feature?(:map) && map_location_available?(@proposal.map_location) %>
<div class="margin">
<%= render_map(@proposal.map_location, "proposal", false, nil) %>
</div>
<% end %>
<% if @proposal.video_url.present? %>
<div class="video-link">
<p>
<span class="icon-video"></span>
<strong><%= t("proposals.show.title_video_url") %></strong>
</p>
<%= text_with_links @proposal.video_url %>
</div>
<% end %>
<% if @proposal.retired? %>
<div id="retired_explanation" class="callout">
<h2>
<%= t("proposals.show.retired") %>:
<%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == "other" %>
</h2>
<%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
</div>
<% end %>
<% if feature?(:allow_attached_documents) %>
<%= render "documents/documents",
documents: @proposal.documents,
max_documents_allowed: Proposal.max_documents_allowed %>
<% end %>
<%= render "shared/tags", taggable: @proposal %>