diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot
index 5564a5c62..53439b281 100644
Binary files a/app/assets/fonts/icons.eot and b/app/assets/fonts/icons.eot differ
diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg
index 0d94e5751..a0c854397 100644
--- a/app/assets/fonts/icons.svg
+++ b/app/assets/fonts/icons.svg
@@ -65,4 +65,9 @@
" + @token + "");
token_message.show()
false
+
+ $(".zoom-link").on "click", (event) ->
+ element = event.target
+ answer = $(element).closest('div.answer')
+
+ if $(answer).hasClass('medium-6')
+ $(answer).removeClass("medium-6");
+ $(answer).addClass("answer-divider");
+ unless $(answer).hasClass('first')
+ $(answer).insertBefore($(answer).prev('div.answer'));
+ else
+ $(answer).addClass("medium-6");
+ $(answer).removeClass("answer-divider");
+ unless $(answer).hasClass('first')
+ $(answer).insertAfter($(answer).next('div.answer'));
+
diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss
index 96eb10a0d..b9f2735b4 100644
--- a/app/assets/stylesheets/icons.scss
+++ b/app/assets/stylesheets/icons.scss
@@ -268,3 +268,23 @@
.icon-search-minus::before {
content: '\35';
}
+
+.icon-calculator::before {
+ content: '\36';
+}
+
+.icon-map-marker::before {
+ content: '\37';
+}
+
+.icon-user-plus::before {
+ content: '\38';
+}
+
+.icon-file-text-o::before {
+ content: '\39';
+}
+
+.icon-file-text::before {
+ content: '\21';
+}
diff --git a/app/controllers/admin/poll/officer_assignments_controller.rb b/app/controllers/admin/poll/officer_assignments_controller.rb
index fd62df8b3..7532362a7 100644
--- a/app/controllers/admin/poll/officer_assignments_controller.rb
+++ b/app/controllers/admin/poll/officer_assignments_controller.rb
@@ -25,7 +25,9 @@ class Admin::Poll::OfficerAssignmentsController < Admin::Poll::BaseController
def search_officers
load_search
- @officers = User.joins(:poll_officer).search(@search).order(username: :asc)
+
+ poll_officers = User.where(id: @poll.officers.pluck(:user_id))
+ @officers = poll_officers.search(@search).order(username: :asc)
respond_to do |format|
format.js
diff --git a/app/helpers/shifts_helper.rb b/app/helpers/shifts_helper.rb
index 5c99bad66..3773014ac 100644
--- a/app/helpers/shifts_helper.rb
+++ b/app/helpers/shifts_helper.rb
@@ -1,7 +1,7 @@
module ShiftsHelper
def shift_vote_collection_dates(polls)
- date_options((start_date(polls)..end_date(polls)))
+ date_options((start_date(polls)..end_date(polls)), Poll::Shift.tasks[:vote_collection])
end
def shift_recount_scrutiny_dates(polls)
@@ -9,11 +9,15 @@ module ShiftsHelper
initial_date = date < Date.current ? Date.current : date
total << (initial_date..date + Poll::RECOUNT_DURATION).to_a
end
- date_options(dates.flatten.uniq)
+ date_options(dates.flatten.uniq, Poll::Shift.tasks[:recount_scrutiny])
end
- def date_options(dates)
- dates.map { |date| [l(date, format: :long), l(date)] }
+ def date_options(dates, task_id)
+ valid_dates(dates, task_id).map { |date| [l(date, format: :long), l(date)] }
+ end
+
+ def valid_dates(dates, task_id)
+ dates.reject { |date| officer_shifts(task_id).include?(date) }
end
def start_date(polls)
@@ -29,4 +33,9 @@ module ShiftsHelper
officers.collect { |officer| [officer.name, officer.id] }
end
+ private
+
+ def officer_shifts(task_id)
+ @officer.shifts.where(task: task_id).map(&:date)
+ end
end
diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb
index 9f8c8c13e..fe1c5f450 100644
--- a/app/helpers/welcome_helper.rb
+++ b/app/helpers/welcome_helper.rb
@@ -55,8 +55,4 @@ module WelcomeHelper
end
end
- def highlight_background
- (feature?("user.recommendations") && current_user) ? "highlight" : ""
- end
-
end
diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb
index 21dc7cffb..f2af2c116 100644
--- a/app/views/admin/_menu.html.erb
+++ b/app/views/admin/_menu.html.erb
@@ -136,7 +136,7 @@
<% if feature?(:legislation) %>
|
- <%= text_with_links comment.body %> - <% if comment.commentable.hidden? %> - (<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>) - <% else %> - <%= link_to comment.commentable.title, comment.commentable %> - <% end %> - |
-
- <%= link_to t("admin.actions.restore"),
- restore_admin_comment_path(comment, request.query_parameters),
- method: :put,
- data: { confirm: t("admin.actions.confirm") },
- class: "button hollow on-hover-block" %>
- <% unless comment.confirmed_hide? %>
- <%= link_to t("admin.actions.confirm_hide"),
- confirm_hide_admin_comment_path(comment, request.query_parameters),
+
|
+
|
- <%= debate.title %>
- -
- <%= debate.description %>
-
- |
-
- <%= link_to t("admin.actions.restore"),
- restore_admin_debate_path(debate, request.query_parameters),
- method: :put,
- data: { confirm: t("admin.actions.confirm") },
- class: "button hollow on-hover" %>
- <% unless debate.confirmed_hide? %>
- <%= link_to t("admin.actions.confirm_hide"),
- confirm_hide_admin_debate_path(debate, request.query_parameters),
+
|
+
|
- <%= link_to user.name, admin_hidden_user_path(user) %> - |
+
| <%= t("admin.hidden_users.index.user") %> | +<%= t("admin.shared.actions") %> | + + + <% @users.each do |user| %> +
|---|---|
|
+ <%= link_to user.name, admin_hidden_user_path(user) %> + |
- - <%= link_to t("admin.actions.restore"), - restore_admin_hidden_user_path(user, request.query_parameters), - method: :put, - data: { confirm: t("admin.actions.confirm") }, - class: "button hollow on-hover" %> - <% unless user.confirmed_hide? %> - <%= link_to t("admin.actions.confirm_hide"), - confirm_hide_admin_hidden_user_path(user, request.query_parameters), - method: :put, - class: "button hollow warning on-hover" %> - <% end %> - | -+ <%= link_to t("admin.actions.restore"), + restore_admin_hidden_user_path(user, request.query_parameters), + method: :put, + data: { confirm: t("admin.actions.confirm") }, + class: "button hollow warning" %> + <% unless user.confirmed_hide? %> + <%= link_to t("admin.actions.confirm_hide"), + confirm_hide_admin_hidden_user_path(user, request.query_parameters), + method: :put, + class: "button" %> + <% end %> + | + + <% end %> + +
| <%= t("admin.poll_officer_assignments.index.table_name") %> | <%= t("admin.poll_officer_assignments.index.table_email") %> | diff --git a/app/views/admin/poll/polls/index.html.erb b/app/views/admin/poll/polls/index.html.erb index 791ec4876..487f0fa54 100644 --- a/app/views/admin/poll/polls/index.html.erb +++ b/app/views/admin/poll/polls/index.html.erb @@ -7,7 +7,7 @@ <% if @polls.any? %>
|---|
| <%= t("admin.polls.index.name") %> | +<%= t("admin.polls.index.name") %> | <%= t("admin.polls.index.dates") %> | <%= t("admin.actions.actions") %> | diff --git a/app/views/admin/poll/shifts/new.html.erb b/app/views/admin/poll/shifts/new.html.erb index b975c40a9..4e0665ea2 100644 --- a/app/views/admin/poll/shifts/new.html.erb +++ b/app/views/admin/poll/shifts/new.html.erb @@ -1,4 +1,4 @@ -<%= back_link_to admin_booths_path %> +<%= back_link_to available_admin_booths_path %>
|---|
|
- <%= proposal.title %>
- -
-
- <%= proposal.summary %> - <%= proposal.description %> - <% if proposal.external_url.present? %> -<%= text_with_links proposal.external_url %> - <% end %> - <% if proposal.video_url.present? %> -<%= text_with_links proposal.video_url %> - <% end %> -<%= proposal.question %> - |
-
- <%= link_to t("admin.actions.restore"),
- restore_admin_proposal_path(proposal, request.query_parameters),
- method: :put,
- data: { confirm: t("admin.actions.confirm") },
- class: "button hollow on-hover-block" %>
- <% unless proposal.confirmed_hide? %>
- <%= link_to t("admin.actions.confirm_hide"),
- confirm_hide_admin_proposal_path(proposal, request.query_parameters),
+
|
+
| <%= t("admin.tags.index.topic") %> | +<%= t("admin.actions.actions") %> | + + <% @tags.each do |tag| %>|
|---|---|---|
| + | <%= form_for(tag, url: admin_tag_path(tag), as: :tag, - html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %> + html: { id: "edit_tag_#{tag.id}"}) do |f| %> - - <%= tag.name %> - - - <%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %> + <%= tag.name %> <% end %> | ++ <%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert" %> + |