-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
show.html.erb
92 lines (78 loc) · 2.53 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
<% provide :title do %><%= @question.title %><% end %>
<div class="expanded no-margin-top dark-heading">
<div class="row">
<div class="small-12 medium-9 column padding">
<%= back_link_to %>
<h1><%= @question.title %></h1>
<% if @question.proposal.present? %>
<div class="margin-bottom">
<%= link_to t('poll_questions.show.original_proposal'), @question.proposal %>
</div>
<% end %>
<% if can? :answer, @question %>
<%= link_to t('poll_questions.show.answer_this_question'),
@question.poll,
class: 'large button' %>
<% else %>
<%= render 'polls/reasons_for_not_answering', poll: @question.poll %>
<% end %>
</div>
<div class="small-12 medium-3 column info">
<p>
<span class="title">
<strong><%= t('poll_questions.show.author') %></strong>
</span>
<br>
<% if @question.author_visible_name.present? %>
<%= @question.author_visible_name %>
<% else %>
<%= link_to @question.author.name, @question.author %>
<% end %>
</p>
<p>
<span class="title">
<strong><%= t('poll_questions.show.poll') %></strong>
</span>
<br>
<%= link_to @question.poll.name, @question.poll %>
</p>
<p>
<span class="title">
<strong><%= t('poll_questions.show.dates_title') %></strong>
</span>
<br>
<%= poll_dates(@question.poll) %>
</p>
</div>
</div>
</div>
<% if @question.video_url.present? %>
<div class="row margin-top poll-question-show">
<div class="small-12 medium-9 column">
<div class="video-link">
<p>
<span class="icon-video"></span>
<strong><%= t('proposals.show.title_video_url') %></strong>
</p>
<%= text_with_links @question.video_url %>
</div>
</div>
</div>
<% end %>
<div class="row margin-top">
<div class="small-12 medium-9 column">
<h3><%= t('poll_questions.show.more_info') %></h3>
<%= @question.description %>
</div>
</div>
<div class="tabs-content" data-tabs-content="questions-tabs" role="tablist">
<%= render "polls/questions/filter_subnav" %>
<div class="tabs-panel is-active" id="tab-comments">
<%= render "shared/comments" %>
</div>
<div class="tabs-panel" id="tab-documents">
<%= render 'documents/documents',
documents: @question.documents,
max_documents_allowed: Poll::Question.max_documents_allowed %>
</div>
</div>