polish styles for tables, assignments and searches on polls admin
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<%= link_to @poll.name, admin_poll_path(@poll, anchor: 'tab-officers') %>
|
||||
<%= link_to admin_poll_path(@poll, anchor: 'tab-officers') do %>
|
||||
<span class="icon-angle-left"></span>
|
||||
<%= @poll.name %>
|
||||
<% end %>
|
||||
|
||||
<h2><%= @officer.name %> - <%= @officer.email %></h2>
|
||||
|
||||
<%= form_tag(admin_officer_assignments_path, {id: "officer_assignment_form"}) do %>
|
||||
@@ -40,7 +44,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.poll_officer_assignments.index.date") %></th>
|
||||
<th colspan="2"><%= t("admin.poll_officer_assignments.index.booth") %></th>
|
||||
<th><%= t("admin.poll_officer_assignments.index.booth") %></th>
|
||||
<th class="text-center"><%= t("admin.poll_officer_assignments.index.assignment") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -48,7 +53,7 @@
|
||||
<tr id="<%= dom_id officer_assignment %>">
|
||||
<td><%= l officer_assignment.date.to_date %></td>
|
||||
<td><%= booth_name_with_location(officer_assignment.booth_assignment.booth) %></td>
|
||||
<td class="text-right">
|
||||
<td class="text-center">
|
||||
<%= link_to t("admin.poll_officer_assignments.index.remove_assignment"),
|
||||
admin_officer_assignment_path(officer_assignment),
|
||||
method: :delete,
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<%= t("admin.polls.show.no_booths") %>
|
||||
</div>
|
||||
<% else %>
|
||||
<table>
|
||||
<table class="margin">
|
||||
<thead>
|
||||
<th><%= t("admin.polls.show.name") %></th>
|
||||
<th><%= t("admin.polls.show.location") %></th>
|
||||
<th> </th>
|
||||
<th><%= t("admin.polls.show.table_name") %></th>
|
||||
<th><%= t("admin.polls.show.table_location") %></th>
|
||||
<th class="text-center"><%= t("admin.polls.show.table_assignment") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @poll.booths.each do |booth| %>
|
||||
@@ -22,7 +22,7 @@
|
||||
<td>
|
||||
<%= booth.location %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td class="text-center">
|
||||
<%= link_to t("admin.polls.show.remove_booth"),
|
||||
admin_booth_assignment_path(poll: @poll, booth: booth),
|
||||
method: :delete,
|
||||
@@ -32,4 +32,4 @@
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<%= t("admin.polls.show.no_officers") %>
|
||||
</div>
|
||||
<% else %>
|
||||
<table>
|
||||
<table class="margin">
|
||||
<thead>
|
||||
<th><%= t("admin.polls.show.name") %></th>
|
||||
<th><%= t("admin.polls.show.email") %></th>
|
||||
|
||||
@@ -5,11 +5,21 @@
|
||||
<%= t('admin.polls.show.no_questions') %>
|
||||
</div>
|
||||
<% else %>
|
||||
<table class="margin-top">
|
||||
<table class="margin">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t('admin.polls.show.table_title') %></th>
|
||||
<th class="text-center"><%= t('admin.polls.show.table_assignment') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<% @poll.questions.each do |question| %>
|
||||
<tr id="<%= dom_id(question) %>">
|
||||
<td><%= link_to question.title, admin_question_path(question) %></td>
|
||||
<td class="text-right">
|
||||
<td>
|
||||
<strong>
|
||||
<%= link_to question.title, admin_question_path(question) %>
|
||||
</strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= link_to t('admin.polls.show.remove_question'),
|
||||
remove_question_admin_poll_path(poll_id: @poll.id, question_id: question.id),
|
||||
class: "button hollow alert",
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<%= form_tag(search_booths_admin_poll_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="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= form_tag(search_booths_admin_poll_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>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-booths-results"></div>
|
||||
|
||||
@@ -1,32 +1,44 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><%= @booths.blank? ? t('admin.polls.show.no_search_results') : t('admin.polls.show.search_results') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= booth.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= booth.location %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if @poll.booth_ids.include?(booth.id) %>
|
||||
<%= link_to t("admin.polls.show.remove_booth"),
|
||||
admin_booth_assignment_path(poll: @poll, booth: booth),
|
||||
method: :delete,
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.polls.show.add_booth"),
|
||||
admin_booth_assignments_path(poll: @poll, booth: booth),
|
||||
method: :post,
|
||||
class: "button hollow" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% if @booths.blank? %>
|
||||
<div class="callout alert margin-bottom">
|
||||
<%= t('admin.polls.show.no_search_results') %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h3><%= t('admin.polls.show.search_results') %></h3>
|
||||
<% end %>
|
||||
|
||||
<% if @booths.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.polls.show.table_name") %></th>
|
||||
<th><%= t("admin.polls.show.table_location") %></th>
|
||||
<th class="text-center"><%= t("admin.polls.show.table_assignment") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @booths.each do |booth| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= booth.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= booth.location %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<% if @poll.booth_ids.include?(booth.id) %>
|
||||
<%= link_to t("admin.polls.show.remove_booth"),
|
||||
admin_booth_assignment_path(poll: @poll, booth: booth),
|
||||
method: :delete,
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.polls.show.add_booth"),
|
||||
admin_booth_assignments_path(poll: @poll, booth: booth),
|
||||
method: :post,
|
||||
class: "button hollow" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
<%= form_tag(search_officers_admin_poll_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="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= form_tag(search_officers_admin_poll_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>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-officers-results"></div>
|
||||
|
||||
@@ -1,30 +1,42 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><%= @officers.blank? ? t('admin.polls.show.no_search_results') : t('admin.polls.show.search_results') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @officers.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= user.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= user.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if @poll.officer_ids.include?(user.poll_officer.id) %>
|
||||
<%= link_to t("admin.polls.show.edit_officer_assignments"),
|
||||
admin_officer_assignments_path(poll: @poll, officer: user.poll_officer),
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.polls.show.add_officer_assignments"),
|
||||
admin_officer_assignments_path(poll: @poll, officer: user.poll_officer),
|
||||
class: "button hollow" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% if @officers.blank? %>
|
||||
<div class="callout alert margin-bottom">
|
||||
<%= t('admin.polls.show.no_search_results') %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h3><%= t('admin.polls.show.search_results') %></h3>
|
||||
<% end %>
|
||||
|
||||
<% if @officers.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.polls.show.table_name") %></th>
|
||||
<th><%= t("admin.polls.show.table_email") %></th>
|
||||
<th class="text-center"><%= t("admin.polls.show.table_assignment") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @officers.each do |user| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= user.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= user.email %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<% if @poll.officer_ids.include?(user.poll_officer.id) %>
|
||||
<%= link_to t("admin.polls.show.edit_officer_assignments"),
|
||||
admin_officer_assignments_path(poll: @poll, officer: user.poll_officer),
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.polls.show.add_officer_assignments"),
|
||||
admin_officer_assignments_path(poll: @poll, officer: user.poll_officer),
|
||||
class: "button hollow" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
<%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %>
|
||||
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %>
|
||||
</div>
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-questions-results"></div>
|
||||
|
||||
@@ -1,25 +1,37 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><%= @questions.blank? ? t('admin.polls.show.no_search_results') : t('admin.polls.show.search_results') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @questions.each do |question| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= question.title %>
|
||||
</td>
|
||||
<td>
|
||||
<%= question.summary %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.polls.show.add_question"),
|
||||
add_question_admin_poll_path(poll_id: @poll.id, question_id: question.id),
|
||||
method: :patch,
|
||||
class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% if @questions.blank? %>
|
||||
<div class="callout alert margin-bottom">
|
||||
<%= t('admin.polls.show.no_search_results') %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h3><%= t('admin.polls.show.search_results') %></h3>
|
||||
<% end %>
|
||||
|
||||
<% if @questions.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.polls.show.table_name") %></th>
|
||||
<th><%= t("admin.polls.show.table_summary") %></th>
|
||||
<th class="text-center"><%= t("admin.polls.show.table_assignment") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @questions.each do |question| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= question.title %>
|
||||
</td>
|
||||
<td>
|
||||
<%= question.summary %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= link_to t("admin.polls.show.add_question"),
|
||||
add_question_admin_poll_path(poll_id: @poll.id, question_id: question.id),
|
||||
method: :patch,
|
||||
class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
@@ -1,39 +1,30 @@
|
||||
<h2 class="inline-block">
|
||||
<%= @poll.name %>
|
||||
<small><%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %></small>
|
||||
</h2>
|
||||
|
||||
<%= link_to t("admin.actions.edit"),
|
||||
edit_admin_poll_path(@poll),
|
||||
class: "button hollow float-right" %>
|
||||
|
||||
<h2 class="inline-block">
|
||||
<%= @poll.name %>
|
||||
</h2>
|
||||
<br>
|
||||
<p class="inline-block">
|
||||
(<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>)
|
||||
</p>
|
||||
|
||||
<div id="poll-resources" class="tabs-content" data-tabs-content="assigned-resources-tabs">
|
||||
<%= render "filter_subnav" %>
|
||||
|
||||
<div class="tabs-panel is-active" id="tab-questions">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= render "search_questions" %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render "search_questions" %>
|
||||
<%= render "questions" %>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="tab-booths">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= render "search_booths" %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render "search_booths" %>
|
||||
<%= render "booths" %>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="tab-officers">
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= render "search_officers" %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render "search_officers" %>
|
||||
<%= render 'officers' %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -7,14 +7,17 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<% if @question.proposal.present? %>
|
||||
<%= t("admin.questions.show.proposal") %>
|
||||
<%= link_to @question.proposal.title, proposal_path(@question.proposal) %>
|
||||
<% end %>
|
||||
|
||||
<strong><%= t("admin.questions.show.title") %></strong>
|
||||
<h1><%= @question.title %></h1>
|
||||
|
||||
<% if @question.proposal.present? %>
|
||||
<p>
|
||||
<strong><%= t("admin.questions.show.proposal") %></strong>
|
||||
<br>
|
||||
<%= link_to @question.proposal.title, proposal_path(@question.proposal) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<strong><%= t("admin.questions.show.author") %></strong>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user