-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix multiple days in debates #33
Changes from 9 commits
83d3f40
cb2aacb
1076e39
a1c5752
159dc1d
f18dab0
7103bd1
a492491
afdbda6
a8a13a7
9d2096e
0da9980
2926662
95a6bdd
d442342
8518855
8199975
43bc3f9
09503cb
d5a303a
0471aa8
0ca84ac
29294c6
5d15a74
6a80f5a
9feace2
107a7d5
1155564
b0713ac
a9b93cd
8a2d06e
e63357f
f3bf3ad
f7c2ff9
74a44e5
7594648
b34c4f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,18 +41,29 @@ edit_link( | |
<% elsif admin_allowed_to?(:close, :debate, debate: debate) %> | ||
<%= link_to t(close_debate_action_text), Decidim::EngineRouter.admin_proxy(debate.component).edit_debate_debate_close_path(debate_id: debate.id, id: debate.id), class: "button hollow expanded button-sc button--icon follow-button" %> | ||
<% end %> | ||
|
||
<div class="card extra"> | ||
<div class="card__content"> | ||
<div class="card__content--multiple"> | ||
</br> | ||
<% if debate.start_time.present? && debate.end_time.present? %> | ||
<div class="extra__date"> | ||
<% if debate.start_time.strftime("%d") == debate.end_time.strftime("%d") && debate.start_time.strftime("%H") != debate.end_time.strftime("%H") %> | ||
<%= l debate.start_time, format: "%d" %> <span class="extra__month"><%= l debate.start_time, format: "%B" %></span> | ||
<div class="extra__time text-small"> <%= l debate.start_time, format: "%H:%M" %> a <%= l debate.end_time, format: "%H:%M" %></div> | ||
</div> | ||
<% elsif debate.start_time.strftime("%d") != debate.end_time.strftime("%d") && debate.start_time.strftime("%H") != debate.end_time.strftime("%H") %> | ||
<%= l debate.start_time, format: "%d" %> <span class="extra__month"><%= l debate.start_time, format: "%B" %></span> | ||
<div class="extra__time text-small"> <%= l debate.start_time, format: "%H:%M" %></span></div> | ||
<%= icon "arrow-thin-right", class: "icon-arrow-thin-right" %> | ||
</div> | ||
|
||
<div class="extra__date"> | ||
<%= l debate.end_time, format: "%d" %> <span class="extra__month"> <%= l debate.end_time, format: "%B" %></span> | ||
<div class="extra__time text-small"> <%= l debate.end_time, format: "%H:%M" %></span></div> | ||
</div> | ||
<div class="extra__time"> | ||
<%= l debate.start_time, format: "%H:%M" %> - <%= l debate.end_time, format: "%H:%M" %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
|
||
<% if endorsements_enabled? && allowed_to?(:endorse, :debate, debate: debate) %> | ||
<% if endorsements_enabled? && allowed_to?(:endorse, :debate, debate: debate) %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Woops! Wrong indentation 🙆🏽♀️ |
||
<div class="row collapse buttons__row"> | ||
<div class="column small-12 collapse"> | ||
<%= endorsement_buttons_cell(debate) %> | ||
|
@@ -62,6 +73,7 @@ edit_link( | |
<%= follow_button_for(debate) %> | ||
</div> | ||
</div> | ||
|
||
<div class="card extra"> | ||
<div class="definition-data"> | ||
<div class="definition-data__item definition-data__item"> | ||
|
@@ -76,14 +88,12 @@ edit_link( | |
<% end %> | ||
</span> | ||
</div> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is unnecessary to remove these blank lines, and it makes it more difficult to focus on the real changes this PR is making ;) The automatic |
||
<div class="definition-data__item definition-data__item--double"> | ||
<span class="definition-data__title"> | ||
<%= t ".participants_count" %> | ||
</span> | ||
<span class="definition-data__number"><%= debate_presenter.participants_count %></span> | ||
</div> | ||
|
||
<div class="definition-data__item definition-data__item--double"> | ||
<span class="definition-data__title"> | ||
<%= t ".groups_count" %> | ||
|
@@ -106,11 +116,9 @@ edit_link( | |
<% end %> | ||
|
||
<%= render_debate_description(debate) %> | ||
|
||
<% if debate.closed? %> | ||
<%= cell("decidim/announcement", { announcement: { title: t(".debate_conclusions_are", date: l(debate.closed_at, format: :decidim_short)), body: simple_format(translated_attribute(debate.conclusions)) }, callout_class: "success" }) %> | ||
<% end %> | ||
|
||
<% if translated_attribute(debate.instructions).present? %> | ||
<div class="callout secondary"> | ||
<%= decidim_sanitize(simple_format(translated_attribute(debate.instructions), {}, sanitize: false)) %> | ||
|
@@ -121,6 +129,7 @@ edit_link( | |
<%= decidim_sanitize(simple_format(translated_attribute(debate.information_updates), {}, sanitize: false)) %> | ||
</div> | ||
<% end %> | ||
|
||
<% if debate.category %> | ||
<ul class="tags tags--debate"> | ||
<li><%= link_to translated_attribute(debate.category.name), debates_path(filter: { category_id: debate.category.id }) %></li> | ||
|
@@ -147,3 +156,4 @@ edit_link( | |
form: close_debate_form | ||
} | ||
%> | ||
<% end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this class to be used in the whole of decidim or will it only be used in the cards used by debates? If so maybe it should go in another scss file related to cards or to debates.