Unifies styles and views for admin polls
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= form_tag(search_booths_admin_poll_booth_assignments_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.booths_search.placeholder"), id: "search-booths" %>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.booths_search.button"), class: "button" %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 margin-top">
|
||||
<%= form_tag(search_booths_admin_poll_booth_assignments_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.booths_search.placeholder"), id: "search-booths" %>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.booths_search.button"), class: "button" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-booths-results"></div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<%= render "/admin/poll/polls/subnav" %>
|
||||
<%= render "search_booths" %>
|
||||
|
||||
<h3><%= t("admin.poll_booth_assignments.index.booths_title") %></h3>
|
||||
<h3 class="inline-block"><%= t("admin.poll_booth_assignments.index.booths_title") %></h3>
|
||||
|
||||
<%= link_to t("admin.booth_assignments.manage_assignments"),
|
||||
manage_admin_poll_booth_assignments_path(@poll),
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= form_tag(search_officers_admin_poll_officer_assignments_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.poll_officers_search.placeholder"), id: "search-officers" %>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.poll_officers_search.button"), class: "button" %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 margin-top">
|
||||
<%= form_tag(search_officers_admin_poll_officer_assignments_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.poll_officers_search.placeholder"), id: "search-officers" %>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.poll_officers_search.button"), class: "button" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-officers-results"></div>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<%= form_for [:admin, @poll] do |f| %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="clear">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.text_field :starts_at,
|
||||
value: @poll.starts_at.present? ? l(@poll.starts_at.to_date) : nil,
|
||||
@@ -19,25 +17,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%=f.text_area :summary, rows: 4%>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<%=f.text_area :summary, rows: 4%>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%=f.text_area :description, rows: 8%>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<%=f.text_area :description, rows: 8%>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= render 'images/admin_image', imageable: @poll, f: f %>
|
||||
</div>
|
||||
<div class="small-12 column">
|
||||
<%= render 'images/admin_image', imageable: @poll, f: f %>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="clear">
|
||||
<div class="small-6 medium-6 column">
|
||||
<%= f.check_box :geozone_restricted, data: { checkbox_toggle: "#geozones" } %>
|
||||
</div>
|
||||
@@ -55,10 +47,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-4 column">
|
||||
<div class="clear">
|
||||
<div class="small-12 medium-4 large-2 column">
|
||||
<%= f.submit t("admin.polls.#{admin_submit_action(@poll)}.submit_button"),
|
||||
class: "button success expanded" %>
|
||||
class: "button success expanded margin-top" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -8,11 +8,15 @@
|
||||
<%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="small-6 column">
|
||||
<%= link_to t("admin.actions.edit"),
|
||||
edit_admin_poll_path(poll),
|
||||
class: "button hollow" %>
|
||||
class: "button hollow expanded" %>
|
||||
</div>
|
||||
<div class="small-6 column">
|
||||
<%= link_to t("admin.actions.configure"),
|
||||
admin_poll_path(poll),
|
||||
class: "button hollow" %>
|
||||
class: "button hollow expanded" %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
<% if @poll.questions.empty? %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t('admin.polls.show.no_questions') %>
|
||||
<%= t("admin.polls.show.no_questions") %>
|
||||
</div>
|
||||
<% else %>
|
||||
<table class="fixed margin">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t('admin.polls.show.table_title') %></th>
|
||||
<th><%= t("admin.polls.show.table_title") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<% @poll.questions.each do |question| %>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
<%= link_to t("admin.polls.index.create"),
|
||||
new_admin_poll_path,
|
||||
class: "button success float-right" %>
|
||||
class: "button float-right" %>
|
||||
|
||||
<% if @polls.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<th class="medium-6"><%= t("admin.polls.index.name") %></th>
|
||||
<th class="small-6"><%= t("admin.polls.index.name") %></th>
|
||||
<th><%= t("admin.polls.index.dates") %></th>
|
||||
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render @polls %>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<%= back_link_to %>
|
||||
<div class="small-12 column">
|
||||
<%= back_link_to %>
|
||||
|
||||
<h2><%= t("admin.polls.new.title") %></h2>
|
||||
<h2><%= t("admin.polls.new.title") %></h2>
|
||||
</div>
|
||||
|
||||
<div class="polls-form">
|
||||
<%= render "form" %>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
<%= f.text_field :title %>
|
||||
|
||||
<div class="small-12 medium-6 large-4 margin-top">
|
||||
<%= f.submit(class: "button expanded", value: t("shared.save")) %>
|
||||
<div class="small-12 medium-4 large-2 margin-top">
|
||||
<%= f.submit(class: "button success expanded", value: t("shared.save")) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,23 +4,27 @@
|
||||
|
||||
<% if @questions.count == 0 %>
|
||||
<div class="callout primary margin-top">
|
||||
<%= t('admin.questions.index.no_questions') %>
|
||||
<%= t("admin.questions.index.no_questions") %>
|
||||
</div>
|
||||
<% else %>
|
||||
<table class="fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t('admin.questions.index.table_question') %></th>
|
||||
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
||||
<th class="small-8"><%= t("admin.questions.index.table_question") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @questions.each do |question| %>
|
||||
<tr id="<%= dom_id(question) %>">
|
||||
<td><%= link_to question.title, admin_question_path(question) %></td>
|
||||
<td class="text-right">
|
||||
<%= link_to t('shared.edit'), edit_admin_question_path(question), class: "button hollow" %>
|
||||
<%= link_to t('shared.delete'), admin_question_path(question), class: "button hollow alert", method: :delete %>
|
||||
<td>
|
||||
<div class="small-6 column">
|
||||
<%= link_to t("shared.edit"), edit_admin_question_path(question), class: "button hollow expanded" %>
|
||||
</div>
|
||||
<div class="small-6 column">
|
||||
<%= link_to t("shared.delete"), admin_question_path(question), class: "button hollow alert expanded", method: :delete %>
|
||||
<div class="small-6 column">
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<table class="fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t('admin.questions.index.table_proposal') %></th>
|
||||
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
||||
<th class="small-9"><%= t("admin.questions.index.table_proposal") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -15,7 +15,7 @@
|
||||
<strong><%= proposal.question %></strong>
|
||||
</p>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td>
|
||||
<%= link_to t("admin.questions.index.create_question"),
|
||||
new_admin_question_path(proposal_id: proposal.id),
|
||||
class: "button hollow" %>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
ckeditor: { language: I18n.locale } %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 medium-6 large-4 margin-top">
|
||||
<%= f.submit(class: "button expanded", value: t("shared.save")) %>
|
||||
<div class="small-12 medium-4 large-2 margin-top">
|
||||
<%= f.submit(class: "button success expanded", value: t("shared.save")) %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<ul class="breadcrumbs margin-top">
|
||||
<li><%= @answer.title %></li>
|
||||
<li><%= t('admin.answers.edit.title') %></li>
|
||||
<li><%= t("admin.answers.edit.title") %></li>
|
||||
</ul>
|
||||
|
||||
<h2 class="margin-top">
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
<ul class="breadcrumbs margin-top">
|
||||
<li><%= @question.title %></li>
|
||||
<li><%= t('admin.answers.new.title') %></li>
|
||||
<li><%= t("admin.answers.new.title") %></li>
|
||||
</ul>
|
||||
|
||||
<h2><%= t('admin.answers.new.title') %></h2>
|
||||
<h2><%= t("admin.answers.new.title") %></h2>
|
||||
|
||||
<div class="poll-question-answer-form">
|
||||
<%= render "form", form_url: admin_question_answers_path %>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h2 class="inline-block"><%= t('admin.questions.index.title') %></h2>
|
||||
<h2 class="inline-block"><%= t("admin.questions.index.title") %></h2>
|
||||
|
||||
<%= link_to t('admin.questions.index.create'), new_admin_question_path,
|
||||
class: "button success float-right" %>
|
||||
<%= link_to t("admin.questions.index.create"), new_admin_question_path,
|
||||
class: "button float-right" %>
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<%= render 'search' %>
|
||||
|
||||
@@ -29,13 +29,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear">
|
||||
<%= link_to t("admin.questions.show.add_answer"), new_admin_question_answer_path(@question),
|
||||
class: "button float-right" %>
|
||||
</div>
|
||||
|
||||
<table class="margin-top">
|
||||
<tr>
|
||||
<th colspan="5" scope="col" class="with-button">
|
||||
<%= t('admin.questions.show.valid_answers') %>
|
||||
<%= link_to t("admin.questions.show.add_answer"),
|
||||
new_admin_question_answer_path(@question),
|
||||
class: "button float-right" %>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user