diff --git a/app/assets/stylesheets/legislation_process.scss b/app/assets/stylesheets/legislation_process.scss index 39a45da93..3fbc509bf 100644 --- a/app/assets/stylesheets/legislation_process.scss +++ b/app/assets/stylesheets/legislation_process.scss @@ -525,7 +525,15 @@ $epigraph-line-height: rem-calc(22); } .draft-panels { + position: relative; padding: 2rem 0; + + aside.absolute { + @include breakpoint(medium) { + position: absolute; + right: 0; + } + } .draft-chooser { margin-bottom: 2rem; diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss index 6609f25df..d57807912 100644 --- a/app/assets/stylesheets/participation.scss +++ b/app/assets/stylesheets/participation.scss @@ -298,7 +298,8 @@ .proposal-show, .investment-project-show, .debate-quiz, -.budget-investment-show { +.budget-investment-show, +.draft-panels { p { word-wrap: break-word; diff --git a/app/views/legislation/annotations/_slim_version_chooser.html.erb b/app/views/legislation/annotations/_slim_version_chooser.html.erb new file mode 100644 index 000000000..cd34736f7 --- /dev/null +++ b/app/views/legislation/annotations/_slim_version_chooser.html.erb @@ -0,0 +1,23 @@ +
+
+

<%= t('legislation.annotations.version_chooser.seeing_version') %>

+
+ <%= form_tag go_to_version_legislation_process_draft_versions_path(process), method: :get, id: "draft_version_go_to_version" do %> + <%= select_tag "draft_version_id", options_from_collection_for_select(process.draft_versions.published, 'id', 'display_title', draft_version.id), "aria-label": t('legislation.draft_versions.show.select_draft_version') %> + <%= hidden_field_tag "redirect_action", "annotations" %> + <%= submit_tag t('legislation.draft_versions.show.select_version_submit'), class: "button" %> + <% end %> +
+ <%= t('legislation.draft_versions.show.updated_at', date: format_date(@draft_version.updated_at)) %> +
+
+ <%= link_to t('legislation.annotations.version_chooser.see_text'), legislation_process_draft_version_path(process, draft_version), title: t('legislation.annotations.version_chooser.see_text'), class: "button strong" %> +
+ +
diff --git a/app/views/legislation/annotations/index.html.erb b/app/views/legislation/annotations/index.html.erb index d7b1ae3fe..ddcd9919b 100644 --- a/app/views/legislation/annotations/index.html.erb +++ b/app/views/legislation/annotations/index.html.erb @@ -8,28 +8,33 @@
<%= render 'version_chooser', process: @process, draft_version: @draft_version %> -
-
- - <% @annotations.each do |annotation| %> -
- <%= t('.comments_about') %> - - <%= link_to legislation_process_draft_version_path(@process, @draft_version, anchor: "annotation-id-#{annotation.id}") do %> - <%= t('.see_in_context') %> - <% end %> - -
- <%= annotation.context.try(:html_safe).presence || annotation.quote %> -
- <%= link_to legislation_process_draft_version_annotation_path(@process, @draft_version, annotation) do %> - <%= t('.comments_count', count: annotation.comments_count) %> - <% end %> -
- <% end %> - +
+ +
+ +
+ + <% @annotations.each do |annotation| %> +
+ <%= t('.comments_about') %> + + <%= link_to legislation_process_draft_version_path(@process, @draft_version, anchor: "annotation-id-#{annotation.id}") do %> + <%= t('.see_in_context') %> + <% end %> + +
+ <%= annotation.context.try(:html_safe).presence || annotation.quote %> +
+ <%= link_to legislation_process_draft_version_annotation_path(@process, @draft_version, annotation) do %> + <%= t('.comments_count', count: annotation.comments_count) %> + <% end %> +
+ <% end %>
diff --git a/app/views/legislation/annotations/show.html.erb b/app/views/legislation/annotations/show.html.erb index 20f5d1a98..765169246 100644 --- a/app/views/legislation/annotations/show.html.erb +++ b/app/views/legislation/annotations/show.html.erb @@ -6,7 +6,7 @@
- <%= render 'version_chooser', process: @process, draft_version: @draft_version %> + <%= render 'slim_version_chooser', process: @process, draft_version: @draft_version %>
diff --git a/app/views/legislation/questions/show.html.erb b/app/views/legislation/questions/show.html.erb index b99e7b17f..9a290e364 100644 --- a/app/views/legislation/questions/show.html.erb +++ b/app/views/legislation/questions/show.html.erb @@ -39,11 +39,7 @@

<%= t('.share') %>

diff --git a/app/views/legislation/shared/_share_buttons.html.erb b/app/views/legislation/shared/_share_buttons.html.erb new file mode 100644 index 000000000..acc86f4ea --- /dev/null +++ b/app/views/legislation/shared/_share_buttons.html.erb @@ -0,0 +1,5 @@ + diff --git a/config/locales/legislation.en.yml b/config/locales/legislation.en.yml index 56e34b800..4517e1f31 100644 --- a/config/locales/legislation.en.yml +++ b/config/locales/legislation.en.yml @@ -98,9 +98,6 @@ en: next_question: Next question first_question: First question share: Share - share_twitter: Share on Twitter - share_facebook: Share on Facebook - share_gplus: Share on Google+ title: Collaborative legislation process participation: phase_not_open: This phase is not open @@ -111,3 +108,7 @@ en: verified_only: Only verified users can participate, %{verify_account}. verify_account: verify your account debate_phase_not_open: Debate phase has finished and answers are not accepted anymore + shared: + share_twitter: Share on Twitter + share_facebook: Share on Facebook + share_gplus: Share on Google+ diff --git a/config/locales/legislation.es.yml b/config/locales/legislation.es.yml index fe20128ff..1b91ef5c3 100644 --- a/config/locales/legislation.es.yml +++ b/config/locales/legislation.es.yml @@ -98,9 +98,6 @@ es: next_question: Siguiente pregunta first_question: Primera pregunta share: Compartir - share_twitter: Compartir en Twitter - share_facebook: Compartir en Facebook - share_gplus: Compartir en Google+ title: Proceso de legislación colaborativa participation: phase_not_open: Esta fase no está abierta @@ -111,3 +108,7 @@ es: verified_only: Solo los usuarios verificados pueden participar en el debate, %{verify_account}. verify_account: verifica tu cuenta debate_phase_not_open: La fase de debate previo ya ha finalizado y en este momento no se aceptan respuestas + shared: + share_twitter: Compartir en Twitter + share_facebook: Compartir en Facebook + share_gplus: Compartir en Google+