diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss index 403d5566d..cd33ac92d 100644 --- a/app/assets/stylesheets/foundation_and_overrides.scss +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -34,3 +34,4 @@ @include foundation-thumbnail; @include foundation-title-bar; @include foundation-top-bar; +@include foundation-menu-icon; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 8c4549ffd..e5e6562d3 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -246,7 +246,7 @@ a { } } - h2 { + h2, h3 { font-size: $base-font-size; } } diff --git a/app/controllers/admin/banners_controller.rb b/app/controllers/admin/banners_controller.rb index c96c7c72b..b919e0861 100644 --- a/app/controllers/admin/banners_controller.rb +++ b/app/controllers/admin/banners_controller.rb @@ -2,7 +2,6 @@ class Admin::BannersController < Admin::BaseController has_filters %w{all with_active with_inactive}, only: :index - before_action :find_banner, only: [:edit, :update, :destroy] before_action :banner_styles, only: [:edit, :new, :create, :update] before_action :banner_imgs, only: [:edit, :new, :create, :update] @@ -24,7 +23,6 @@ class Admin::BannersController < Admin::BaseController end def update - @banner.assign_attributes(banner_params) if @banner.update(banner_params) redirect_to admin_banners_path else @@ -43,10 +41,6 @@ class Admin::BannersController < Admin::BaseController params.require(:banner).permit(:title, :description, :target_url, :style, :image, :post_started_at, :post_ended_at) end - def find_banner - @banner = Banner.find(params[:id]) - end - def banner_styles @banner_styles = Setting.all.banner_style.map { |banner_style| [banner_style.value, banner_style.key.split('.')[1]] } end diff --git a/app/helpers/layouts_helper.rb b/app/helpers/layouts_helper.rb new file mode 100644 index 000000000..c92f57898 --- /dev/null +++ b/app/helpers/layouts_helper.rb @@ -0,0 +1,12 @@ +module LayoutsHelper + + def layout_menu_link_to(text, path, is_active, options) + if is_active + content_tag(:span, t('shared.you_are_in'), class: 'sr-only') + ' ' + + link_to(text, path, options.merge(class: "active")) + else + link_to(text, path, options) + end + end + +end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 1dbc5baa2..ea1d4fa40 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,5 +1,5 @@ class ApplicationMailer < ActionMailer::Base helper :settings - default from: "Consul " + default from: "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>" layout 'mailer' end diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 3424e6fcc..549b62862 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -1,6 +1,6 @@ <% cache [locale_and_user_status(comment), comment, commentable_cache_key(comment.commentable), comment.author, (@comment_flags[comment.id] if @comment_flags)] do %>
-
+
    <% if comment.hidden? || comment.user.hidden? %> <% if comment.children.size > 0 %> @@ -23,7 +23,7 @@ <% end %> <% end %> -
    +
  • <% if comment.as_administrator? %> @@ -92,14 +92,13 @@ <%= render 'comments/form', {commentable: comment.commentable, parent_id: comment.id, toggeable: true} %> <% end %>
    -
  • + <% end %> - -
    +
      <% child_comments_of(comment).each do |child| %> <%= render 'comments/comment', comment: child %> <% end %> -
    -
+ +
<% end %> diff --git a/app/views/debates/_comments.html.erb b/app/views/debates/_comments.html.erb index cc96ab4ba..e7475662d 100644 --- a/app/views/debates/_comments.html.erb +++ b/app/views/debates/_comments.html.erb @@ -1,31 +1,29 @@ <% cache [locale_and_user_status, @current_order, commentable_cache_key(@debate), @comment_tree.comments, @comment_tree.comment_authors, @debate.comments_count, @comment_flags] do %> -
-
-
-

- <%= t("debates.show.comments_title") %> - (<%= @debate.comments_count %>) -

+
+
+

+ <%= t("debates.show.comments_title") %> + (<%= @debate.comments_count %>) +

- <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> + <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> - <% if user_signed_in? %> - <%= render 'comments/form', {commentable: @debate, parent_id: nil, toggeable: false} %> - <% else %> -
+ <% if user_signed_in? %> + <%= render 'comments/form', {commentable: @debate, parent_id: nil, toggeable: false} %> + <% else %> +
-
- <%= t("debates.show.login_to_comment", - signin: link_to(t("votes.signin"), new_user_session_path), - signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %> -
- <% end %> +
+ <%= t("debates.show.login_to_comment", + signin: link_to(t("votes.signin"), new_user_session_path), + signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %> +
+ <% end %> - <% @comment_tree.root_comments.each do |comment| %> - <%= render 'comments/comment', comment: comment %> - <% end %> - <%= paginate @comment_tree.root_comments %> -
+ <% @comment_tree.root_comments.each do |comment| %> + <%= render 'comments/comment', comment: comment %> + <% end %> + <%= paginate @comment_tree.root_comments %>
-
+ <% end %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 7a528ffa7..e2e2c84c9 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -1,6 +1,6 @@ <% provide :title do %><%= @debate.title %><% end %> <% cache [locale_and_user_status(@debate), @debate, @debate.author, Flag.flagged?(current_user, @debate), @debate_votes] do %> -
+
<%= render "shared/back_link" %> @@ -59,7 +59,7 @@ <% end %>
-
+ <% end %> <%= render "comments" %> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 2ad2303f8..6de8ed89e 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -16,12 +16,7 @@
<%= link_to root_path, class: "hide-for-small-only", accesskey: "/" do %> <%= image_tag('logo_header.png', class: 'hide-for-small-only float-left', size: '80x80', alt: t("layouts.header.logo")) %> - <% if opendata_page? %> - <%= t("layouts.header.open_gov", open: "#{t('layouts.header.open')}") %> | - <%= t("layouts.header.open_data") %> - <% else %> - <%= setting['org_name'] %> - <% end %> + <%= setting['org_name'] %> <% end %>
@@ -34,9 +29,6 @@
@@ -48,9 +40,9 @@
<%= render "shared/subnavigation" %> -
- <%= yield :header_addon %> -
+
+
+ <%= yield :header_addon %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 70ae90b11..34e7776fb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -14,7 +14,7 @@ <%= csrf_meta_tags %> <%= favicon_link_tag "favicon.ico" %> <%= favicon_link_tag "apple-touch-icon-200.png", - rel: "apple-touch-icon", + rel: "icon apple-touch-icon", sizes: "200x200", type: "image/png" %> <%= content_for :social_media_meta_tags %> diff --git a/app/views/proposals/_comments.html.erb b/app/views/proposals/_comments.html.erb index ed52b1b66..c304bc4dd 100644 --- a/app/views/proposals/_comments.html.erb +++ b/app/views/proposals/_comments.html.erb @@ -1,26 +1,24 @@ <% cache [locale_and_user_status, @current_order, commentable_cache_key(@proposal), @comment_tree.comments, @comment_tree.comment_authors, @proposal.comments_count, @comment_flags] do %> -
-
-
- <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> +
+
+ <%= render 'shared/wide_order_selector', i18n_namespace: "comments" %> - <% if user_signed_in? %> - <%= render 'comments/form', {commentable: @proposal, parent_id: nil, toggeable: false} %> - <% else %> -
+ <% if user_signed_in? %> + <%= render 'comments/form', {commentable: @proposal, parent_id: nil, toggeable: false} %> + <% else %> +
-
- <%= t("proposals.show.login_to_comment", - signin: link_to(t("votes.signin"), new_user_session_path), - signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %> -
- <% end %> +
+ <%= t("proposals.show.login_to_comment", + signin: link_to(t("votes.signin"), new_user_session_path), + signup: link_to(t("votes.signup"), new_user_registration_path)).html_safe %> +
+ <% end %> - <% @comment_tree.root_comments.each do |comment| %> - <%= render 'comments/comment', comment: comment %> - <% end %> - <%= paginate @comment_tree.root_comments %> -
+ <% @comment_tree.root_comments.each do |comment| %> + <%= render 'comments/comment', comment: comment %> + <% end %> + <%= paginate @comment_tree.root_comments %>
-
+ <% end %> diff --git a/app/views/proposals/_filter_subnav.html.erb b/app/views/proposals/_filter_subnav.html.erb index b7bc85dd6..fe875c9a9 100644 --- a/app/views/proposals/_filter_subnav.html.erb +++ b/app/views/proposals/_filter_subnav.html.erb @@ -3,18 +3,18 @@ diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index ba6cb677f..6209805cf 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -6,8 +6,7 @@ social_description: @proposal.summary %> <% end %> <% cache [locale_and_user_status(@proposal), @proposal, @proposal.author, Flag.flagged?(current_user, @proposal), @proposal_votes] do %> - -
+
<%= render "shared/back_link" %> @@ -134,7 +133,7 @@
-
+ <% end %>
diff --git a/app/views/shared/_advanced_search.html.erb b/app/views/shared/_advanced_search.html.erb index 00db85b9c..c27c8f8d6 100644 --- a/app/views/shared/_advanced_search.html.erb +++ b/app/views/shared/_advanced_search.html.erb @@ -15,14 +15,14 @@
- + <%= select_tag('advanced_search[official_level]', official_level_search_options, include_blank: t("shared.advanced_search.author_type_blank")) %>
- + <%= select_tag('advanced_search[date_min]', date_range_options, include_blank: t("shared.advanced_search.date_range_blank"), id: 'js-advanced-search-date-min') %> @@ -31,14 +31,18 @@