From 5e31a9f3384e796878a6cffa8fee2c43953b64a7 Mon Sep 17 00:00:00 2001 From: kikito Date: Mon, 24 Aug 2015 14:34:58 +0200 Subject: [PATCH 01/17] adds a new "organization sigup success" view. Related with #226 --- .../organizations/registrations_controller.rb | 8 ++++++++ app/views/organizations/registrations/success.html.erb | 8 ++++++++ config/locales/devise_views.en.yml | 9 +++++++++ config/locales/devise_views.es.yml | 8 ++++++++ config/routes.rb | 9 +++++++-- 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 app/views/organizations/registrations/success.html.erb diff --git a/app/controllers/organizations/registrations_controller.rb b/app/controllers/organizations/registrations_controller.rb index 8602ba4ba..630cc64e4 100644 --- a/app/controllers/organizations/registrations_controller.rb +++ b/app/controllers/organizations/registrations_controller.rb @@ -5,6 +5,9 @@ class Organizations::RegistrationsController < Devise::RegistrationsController end end + def success + end + def create build_resource(sign_up_params) if resource.valid_with_captcha? @@ -17,6 +20,11 @@ class Organizations::RegistrationsController < Devise::RegistrationsController end end + protected + def after_inactive_sign_up_path_for(resource) + organizations_sign_up_success_path + end + private def sign_up_params diff --git a/app/views/organizations/registrations/success.html.erb b/app/views/organizations/registrations/success.html.erb new file mode 100644 index 000000000..91c377102 --- /dev/null +++ b/app/views/organizations/registrations/success.html.erb @@ -0,0 +1,8 @@ +

<%= t('devise_views.organizations.registrations.success.title') %>

+ +

<%= t('devise_views.organizations.registrations.success.thank_you') %>

+ +

<%= t('devise_views.organizations.registrations.success.instructions') %>

+ +

<%= link_to t('devise_views.organizations.registrations.success.back_to_index'), root_path %>

+ diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index e1b2a571d..394c3611c 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -66,6 +66,15 @@ en: phone_number_label: "Phone number" password_confirmation_label: "Confirm password" submit: "Sign up" + success: + title: "Registration of organization / collective pending verification" + thank_you: "Thank you for registering your organization or collective in the website." + instructions: + We will contact you soon in order to verify that you represent your collective. + Meanwhile, please review your email. We have sent you a confirmation link which you + will have to click in order to activate your account. You will then be able to participate + as a non-verified organization. + back_to_index: "Ok, go back to index" sessions: new: title: "Log in" diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 7ed5298de..e27065038 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -66,6 +66,14 @@ es: phone_number_label: "Teléfono" password_confirmation_label: "Confirmar contraseña" submit: "Registrarse" + success: + title: "Registro de organización / colectivo pendiente de verificación" + thank_you: "Gracias por registrar tu colectivo en la web." + instructions: + En breve nos pondremos en contacto contigo para verificar que realmente representas a un colectivo. + Entretanto, por favor revisa tu correo electrónico. Te hemos enviado un enlace que debes pulsar para confirmar + tu correo. Una vez confirmado, podrás empezar a participar como colectivo no verificado. + back_to_index: "Entendido, volver a la página principal" sessions: new: title: "Entrar" diff --git a/config/routes.rb b/config/routes.rb index f224609b9..d55068aab 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,15 @@ Rails.application.routes.draw do devise_for :users, controllers: { registrations: 'users/registrations' } - devise_for :organizations, class_name: 'User', + devise_for(:organizations, class_name: 'User', controllers: { registrations: 'organizations/registrations', sessions: 'devise/sessions' - } + }) + + devise_scope :organization do + get "organizations/sign_up/success", to: "organizations/registrations#success" + end + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". From 6643f971959529963d91aca6898218d5c5b627d4 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 13:51:25 +0200 Subject: [PATCH 02/17] Updates custom icons font --- app/assets/fonts/icons.eot | Bin 5716 -> 5824 bytes app/assets/fonts/icons.svg | 1 + app/assets/fonts/icons.ttf | Bin 5560 -> 5668 bytes app/assets/fonts/icons.woff | Bin 4380 -> 4464 bytes app/assets/stylesheets/icons.scss | 4 ++++ 5 files changed, 5 insertions(+) diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot index 2c00f1f5b9cb03572d4edc47b957eb166f49e9e1..a1cc83d43d12151ca8a386601a45b4974e3b0142 100644 GIT binary patch delta 501 zcmcbjb3m8vfEWXVir7RpGnP5elNu&EH_J_|C}2oom;jWw z0P+>`5_41etvYWrFo;M1#qtXBi%XbKG8X`C=>W=yF)#v2AZ|!{J|~{v<|_j?6HtJG z;S%FBMP!ZUnDWWnn4B3UC;woo1(J=-9g_{1IVW?nXtQwGF)(a4VUZL_W@K<HgWi&H35*ITzG6ynE7&kFXDcC40>1ivm3vvqx zhzUr_TdOMR8YwX|w({x9%km3w|Jw(Y;GW2C}l1xyjLy@eB;2a~K#HWZYd`-5A^$*ns>RAYZ{h zSl`J1cg$`E2F3^=KP)*nu^@0`*gqiu4G@>5Cl(j{|Ife-R9^y==Sa_~OtY_aS72aZ zp25H%Ad!)pn8GS`IdQT8qkKIRP{#(KDyy9QP(Fl#5l8}Ysy>c5Y+^dmqd$!mbi%- SPp%b{VU(CWOH7If* + diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf index 808c75487bf0422da6e512d3c1049bc9e25a6f6d..aa9c63faae88382db31d66dded442022c23bbae3 100644 GIT binary patch delta 554 zcmYL`KWGzS7{;IPzDs%#(p>QpO^hVDR7GM8Txt|eD)=XHkrb6sq$<}WHbbvHOra5! zb`caDs^{R4v5Q;LMMOjp1Q!KY9qbYv+{8f(thFY5Co#%$?5u~f>qy|c?F1Ra--?kZe#Oefc%5eo3p#_ z&JLXr{YqV%o4<7<`&;e>WFOFPciMIPGH6`FVGN)>j!1E_Et~Uj$sEC*1EqJTQ2D9eD16gx~5sZ!* zF{@M&rJ}VvRG9Ob{bt@WrMNqqPwk87q3zccLJ!0F z)VP#SHFz7leu|^sx^am4gVE(gr=!K%6?Vug`BRi(|Dz;sijU6{ab|T$e$Af{AFsXp LYI65+(fkAW*P*ld<#np|$je!lwuL1HE{Dbw4 z{C~&nW?*290P@3|607n1-0ANrZ zUbtgzVQ>Hd50n4^0B`^R0eDNeMdN5?VPpUR5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yGWO1Z>_{`Ya%KC+8 zUsx0;)d@IG;K}HzrLm>4)yjE{*lM(dSG0<^i|T?n_rmcDhgOD3`WPk>px(rkr_|J8 z8U(dkt%{m}ho)zxko6PHB#Szfft(B7aK3}rT+n~T2M24(rWt=GT8ifChOgI0zjxsL z@TuYDN1}(|A$X)RJUV>rz>}kUb%X~%d5rqcRhIW&cyfJo{n*Qu@5A@um&8tCL-qFJESKhh)Fmv;R3>tFtUXm0)Np*|m#_2<%}ZBJ0^d z!fSu1CfK8+cpABkLq6EEwm%aU0UAZ^5mZeDMDPgB}x-8phi|LIDUF0olX~ zdH{HwwT;OQfG`XM$039}+`K4@2Iznn?FSPmfDbEKV@qQ#knqfkaOcoV;%(WKPAM4O z&Jd!pzq~CQY4pdEs+-Z1Q&3V-)8LtD=@=N9SX6erML$MNVpEs(c~Mq%Z;UOSuR00001ZoMT{QU|;~^YubzaCmCG(lKCT3ko4)hkQVX z>>&ta2o@;Ge{{-}sh^P#$OrU`daVdLv=ZW;`?&8t0gs%>7*0kZcjFOvye1wqqfeYG zb530Fz$NiS?pw($pQ>^ny9OTd#B<^?@5~eDead_$E_mT9@kI429b3G1?xEZIUh;vX z<;ac=LDsd$-A1sAxkJ>Tgu`H|sHIE2-$^%bbxRg{R+)x3jqv?p Date: Tue, 25 Aug 2015 14:09:04 +0200 Subject: [PATCH 03/17] Adds styles for flag as inappropriate --- app/assets/stylesheets/admin.scss | 4 ++-- app/assets/stylesheets/debates.scss | 19 +++++++++++++++ app/assets/stylesheets/participacion.scss | 23 +++++++++++++++++-- app/assets/stylesheets/variables.scss | 1 + app/views/comments/_actions.html.erb | 8 +++++-- app/views/comments/_comment.html.erb | 10 +++----- .../_flag_as_inappropiate_actions.html.erb | 21 +++++++++++++++-- .../_flag_as_inappropiate_actions.html.erb | 19 +++++++++++++-- app/views/debates/show.html.erb | 4 ++-- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- 11 files changed, 92 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 7e6096bc3..f62b5efd6 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -140,7 +140,7 @@ body.admin { .delete { border-bottom: 1px dotted #CF2A0E; - color: #F04124; + color: $delete; font-size: rem-calc(12); &:hover, &:active, &:focus { @@ -160,7 +160,7 @@ body.admin { } .rejected { - color: #F04124; + color: $delete; } .level { diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index 66ea491af..641e7ccff 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -5,6 +5,7 @@ // 03. Show // 04. New // 05. Comments +// 06. Flags // // 01. Debates @@ -541,6 +542,10 @@ font-size: rem-calc(12); margin: rem-calc(6) 0; padding: rem-calc(6); + + .divider { + color: $text-light; + } } .comment-user { @@ -608,3 +613,17 @@ .faded { opacity: 0.4; } + +// 06. Flags +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.flag-disable { + color: $text-medium; + line-height: rem-calc(24); + vertical-align: middle; +} + +.flag-active { + @extend .flag-disable; + color: $delete; +} diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index 485dbfd60..b3ee7046a 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -150,6 +150,25 @@ h1, h2, h3, h4, h5, h6 { } } +.f-dropdown { + + li a { + font-size: rem-calc(12); + + &:hover { + color: $link-hover; + } + } + + li:hover, .f-dropdown li:focus { + background: white; + } + + &.open { + outline: none; + } +} + // 04. Header // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -692,13 +711,13 @@ form { } } -img.admin-avatar, img.moderator-avatar { +img.avatar, img.admin-avatar, img.moderator-avatar { border-radius: rem-calc(1000); position: relative; } img.initialjs-avatar { - @extend .moderator-avatar; + @extend .avatar; } .author-deleted { diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 4be7028e3..64861e215 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -38,6 +38,7 @@ $votes-like-act: #5D9E7F; $votes-unlike: #EF8585; $votes-unlike-act: #BD6A6A; +$delete: #F04124; $check: #46DB91; // 03. Forms diff --git a/app/views/comments/_actions.html.erb b/app/views/comments/_actions.html.erb index 5454179f0..51a6743e0 100644 --- a/app/views/comments/_actions.html.erb +++ b/app/views/comments/_actions.html.erb @@ -1,12 +1,16 @@ + + <%= render 'comments/flag_as_inappropiate_actions', comment: comment %> + + <% if can? :hide, comment %> -  |  +  •  <%= link_to t("admin.actions.hide").capitalize, hide_moderation_comment_path(comment), method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %> <% end %> <% if can? :hide, comment.user %> -  |  +  •  <%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(comment.user_id, debate_id: @debate.id), method: :put, data: { confirm: t('admin.actions.confirm') } %> <% end %> diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index ca7474ebd..6f93bdde4 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -58,10 +58,6 @@ <% end %>  • <%= time_ago_in_words(comment.created_at) %> - - - <%= render 'comments/flag_as_inappropiate_actions', comment: comment %> - <% if comment.as_administrator? %> @@ -81,11 +77,11 @@ <%= render 'comments/votes', comment: comment %> -

+

<%= t("debates.comment.responses", count: comment.children_count) %> <% if user_signed_in? %> -  |  +  |  <%= link_to(comment_link_text(comment), "", class: "js-add-comment-link", data: {'id': dom_id(comment)}) %> @@ -93,7 +89,7 @@ <%= render 'comments/form', {parent: comment, toggeable: true} %> <% end %> -

+
<% end %> diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index fad83d4d6..0b62715e3 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -1,6 +1,23 @@ <% if can? :flag_as_inappropiate, comment %> - <%= link_to t('shared.flag_as_inappropiate'), flag_as_inappropiate_comment_path(comment), method: :put, remote: true %> +  |  + + <% end %> + <% if can? :undo_flag_as_inappropiate, comment %> - <%= link_to t('shared.undo_flag_as_inappropiate'), undo_flag_as_inappropiate_comment_path(comment), method: :put, remote: true %> +  |  + + <% end %> diff --git a/app/views/debates/_flag_as_inappropiate_actions.html.erb b/app/views/debates/_flag_as_inappropiate_actions.html.erb index 8003600e0..6db9bc5f4 100644 --- a/app/views/debates/_flag_as_inappropiate_actions.html.erb +++ b/app/views/debates/_flag_as_inappropiate_actions.html.erb @@ -1,6 +1,21 @@ <% if can? :flag_as_inappropiate, debate %> - <%= link_to t('shared.flag_as_inappropiate'), flag_as_inappropiate_debate_path(debate), method: :put, remote: true %> + + <% end %> + <% if can? :undo_flag_as_inappropiate, debate %> - <%= link_to t('shared.undo_flag_as_inappropiate'), undo_flag_as_inappropiate_debate_path(debate), method: :put, remote: true %> + + <% end %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 47ff9e34f..a6765e1b0 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -41,8 +41,8 @@  •    <%= link_to t("debates.show.comments", count: @debate.comment_threads.count), "#comments" %> - - +  •  + <%= render 'debates/flag_as_inappropiate_actions', debate: @debate %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ce3339b25..55e06af4e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -135,7 +135,7 @@ en: tags_cloud: tags: Topics flag_as_inappropiate: Flag as inappropiate - undo_flag_as_inappropiate: Undo flag as inappropiate + undo_flag_as_inappropiate: Undo flag collective: Collective mailer: comment: diff --git a/config/locales/es.yml b/config/locales/es.yml index 1e2cca785..d548f2334 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -135,7 +135,7 @@ es: tags_cloud: tags: Temas flag_as_inappropiate: Denunciar como inapropiado - undo_flag_as_inappropiate: Deshacer denunciar como inapropiado + undo_flag_as_inappropiate: Deshacer denuncia collective: Colectivo mailer: comment: From 8037a82fef911661fe769b8b3e0ce51d8c8e71ad Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 15:19:34 +0200 Subject: [PATCH 04/17] Adds styles to moderation admin --- app/assets/stylesheets/admin.scss | 17 +++++-- app/assets/stylesheets/participacion.scss | 3 +- .../moderation/comments_controller.rb | 2 +- .../moderation/debates_controller.rb | 2 +- app/models/comment.rb | 2 +- app/models/debate.rb | 2 +- app/views/moderation/_menu.html.erb | 12 ++--- app/views/moderation/comments/index.html.erb | 50 +++++++++++-------- app/views/moderation/debates/index.html.erb | 47 +++++++++-------- config/locales/moderation.en.yml | 18 +++---- config/locales/moderation.es.yml | 19 ++++--- 11 files changed, 99 insertions(+), 75 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index f62b5efd6..5afa088d1 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -151,11 +151,16 @@ body.admin { .verified { color: $check; + + a { + border-bottom: 1px dotted $check; + color: $check; + font-size: rem-calc(12); + } } -.verified a { - border-bottom: 1px dotted $check; - color: $check; +.archived { + color: $text-medium; font-size: rem-calc(12); } @@ -163,6 +168,12 @@ body.admin { color: $delete; } +.date { + color: $text-medium; + font-size: rem-calc(12); + font-style: italic; +} + .level { font-size: rem-calc(12); } diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index b3ee7046a..619f25d48 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -135,6 +135,7 @@ h1, h2, h3, h4, h5, h6 { } .sub-nav dt, .sub-nav dd, .sub-nav li { + padding: rem-calc(3) 0; &.active { background: #008CBA; @@ -142,7 +143,7 @@ h1, h2, h3, h4, h5, h6 { color: white; cursor: default; font-weight: normal; - padding: 0.16667rem 0.88889rem; + padding: rem-calc(3) rem-calc(14); a:hover { color: #737373; diff --git a/app/controllers/moderation/comments_controller.rb b/app/controllers/moderation/comments_controller.rb index 03667e286..6434c708e 100644 --- a/app/controllers/moderation/comments_controller.rb +++ b/app/controllers/moderation/comments_controller.rb @@ -31,7 +31,7 @@ class Moderation::CommentsController < Moderation::BaseController end def set_valid_filters - @valid_filters = %w{all pending_review reviewed} + @valid_filters = %w{all pending_review archived} end def parse_filter diff --git a/app/controllers/moderation/debates_controller.rb b/app/controllers/moderation/debates_controller.rb index 22e4eac6b..89360ddaa 100644 --- a/app/controllers/moderation/debates_controller.rb +++ b/app/controllers/moderation/debates_controller.rb @@ -31,7 +31,7 @@ class Moderation::DebatesController < Moderation::BaseController end def set_valid_filters - @valid_filters = %w{all pending_review reviewed} + @valid_filters = %w{all pending_review archived} end def parse_filter diff --git a/app/models/comment.rb b/app/models/comment.rb index 824f1dbf0..0fa84dc6e 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -19,7 +19,7 @@ class Comment < ActiveRecord::Base scope :sorted_for_moderation, -> { order(inappropiate_flags_count: :desc, updated_at: :desc) } scope :pending_review, -> { where(reviewed_at: nil, hidden_at: nil) } - scope :reviewed, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } + scope :archived, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } scope :flagged_as_inappropiate, -> { where("inappropiate_flags_count > 0") } def self.build(commentable, user, body) diff --git a/app/models/debate.rb b/app/models/debate.rb index c16048f70..e31a82a85 100644 --- a/app/models/debate.rb +++ b/app/models/debate.rb @@ -25,7 +25,7 @@ class Debate < ActiveRecord::Base scope :sorted_for_moderation, -> { order(inappropiate_flags_count: :desc, updated_at: :desc) } scope :pending_review, -> { where(reviewed_at: nil, hidden_at: nil) } - scope :reviewed, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } + scope :archived, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } scope :flagged_as_inappropiate, -> { where("inappropiate_flags_count > 0") } # Ahoy setup diff --git a/app/views/moderation/_menu.html.erb b/app/views/moderation/_menu.html.erb index 41e84287a..d7c76b31a 100644 --- a/app/views/moderation/_menu.html.erb +++ b/app/views/moderation/_menu.html.erb @@ -4,17 +4,17 @@ <%= t("moderation.dashboard.index.title") %> -
  • > +
  • > <%= link_to moderation_debates_path do %> - - <%= t('moderation.menu.flagged_debates') %> + + <%= t("moderation.menu.flagged_debates") %> <% end %>
  • -
  • > +
  • > <%= link_to moderation_comments_path do %> - - <%= t('moderation.menu.flagged_comments') %> + + <%= t("moderation.menu.flagged_comments") %> <% end %>
  • diff --git a/app/views/moderation/comments/index.html.erb b/app/views/moderation/comments/index.html.erb index 0d89114f1..02b503497 100644 --- a/app/views/moderation/comments/index.html.erb +++ b/app/views/moderation/comments/index.html.erb @@ -1,45 +1,52 @@ -

    <%= t('moderation.comments.index.title') %>

    +

    <%= t("moderation.comments.index.title") %>

    + +

    <%= page_entries_info @comments %>

    - - - - - + + + + <% @comments.each do |comment| %> - - - - - + + + <% if can? :mark_as_reviewed, comment %> <% end %> <% if comment.reviewed? %> - <% end %> @@ -47,4 +54,3 @@
    <%= t('moderation.comments.index.headers.flags') %><%= t('moderation.comments.index.headers.updated_at') %><%= t('moderation.comments.index.headers.commentable_type') %><%= t('moderation.comments.index.headers.commentable') %><%= t('moderation.comments.index.headers.comment') %> + <%= t("moderation.comments.index.headers.commentable") %> |  + <%= t("moderation.comments.index.headers.commentable_type") %> |  + <%= t("moderation.comments.index.headers.updated_at") %> + <%= t("moderation.comments.index.headers.comment") %><%= t("moderation.comments.index.headers.flags") %><%= t("moderation.debates.index.headers.actions") %>
    <%= comment.inappropiate_flags_count %><%= l comment.updated_at.to_date %><%= comment.commentable_type.constantize.model_name.human %><%= link_to comment.commentable.title, comment.commentable %><%= comment.body %> - <%= link_to t('moderation.comments.index.hide'), hide_in_moderation_screen_moderation_comment_path(comment, request.query_parameters), method: :put %> + <%= link_to comment.commentable.title, comment.commentable %> +
    + <%= comment.commentable_type.constantize.model_name.human %> + <%= l comment.updated_at.to_date %> +
    <%= comment.body %><%= comment.inappropiate_flags_count %> + <%= link_to t("moderation.comments.index.hide"), hide_in_moderation_screen_moderation_comment_path(comment, request.query_parameters), method: :put, class: "delete" %> - <%= link_to t('moderation.comments.index.mark_as_reviewed'), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put %> + <%= link_to t("moderation.comments.index.archive"), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put, class: "button radius tiny warning" %> - <%= t('moderation.comments.index.reviewed') %> + + <%= t("moderation.comments.index.archived") %>
    <%= paginate @comments %> - diff --git a/app/views/moderation/debates/index.html.erb b/app/views/moderation/debates/index.html.erb index 611f68e16..68de5807d 100644 --- a/app/views/moderation/debates/index.html.erb +++ b/app/views/moderation/debates/index.html.erb @@ -1,43 +1,51 @@ -

    <%= t('moderation.debates.index.title') %>

    +

    <%= t("moderation.debates.index.title") %>

    + +

    <%= page_entries_info @debates %>

    - - - - + + + <% @debates.each do |debate| %> - - - - + + <% if can? :mark_as_reviewed, debate %> <% end %> <% if debate.reviewed? %> - <% end %> @@ -45,4 +53,3 @@
    <%= t('moderation.debates.index.headers.flags') %><%= t('moderation.debates.index.headers.updated_at') %><%= t('moderation.debates.index.headers.title') %><%= t('moderation.debates.index.headers.description') %> + <%= t("moderation.debates.index.headers.title") %> |  + <%= t("moderation.debates.index.headers.updated_at") %> |  + <%= t("moderation.debates.index.headers.description") %> + <%= t("moderation.debates.index.headers.flags") %><%= t("moderation.debates.index.headers.actions") %>
    <%= debate.inappropiate_flags_count %><%= l debate.updated_at.to_date %><%= link_to debate.title, debate %><%= debate.description %> - <%= link_to t('moderation.debates.index.hide'), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put %> + <%= link_to debate.title, debate, target: "_blank" %> +
    + <%= l debate.updated_at.to_date %> +
    + <%= debate.description %> +
    <%= debate.inappropiate_flags_count %> + <%= link_to t("moderation.debates.index.hide"), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put, class: "delete" %> - <%= link_to t('moderation.debates.index.mark_as_reviewed'), mark_as_reviewed_moderation_debate_path(debate, request.query_parameters), method: :put %> + <%= link_to t("moderation.debates.index.archive"), mark_as_reviewed_moderation_debate_path(debate, request.query_parameters), method: :put, class: "button radius tiny warning" %> - <%= t('moderation.debates.index.reviewed') %> + + <%= t("moderation.debates.index.archived") %>
    <%= paginate @debates %> - diff --git a/config/locales/moderation.en.yml b/config/locales/moderation.en.yml index 2728f10d9..7688dfa09 100644 --- a/config/locales/moderation.en.yml +++ b/config/locales/moderation.en.yml @@ -8,7 +8,7 @@ en: title: Moderation comments: index: - title: Comments flagged as inappropiate + title: Comments flagged as inappropriate headers: flags: Flags updated_at: Date @@ -16,27 +16,27 @@ en: commentable: Root comment: Comment hide: Hide - mark_as_reviewed: Mark as reviewed - reviewed: Reviewed + archive: Archive + archived: Archived filter: Filter filters: all: All pending_review: Pending - reviewed: Reviewed + archived: Archived debates: index: - title: Debates flagged as inappropiate + title: Debates flagged as inappropriate headers: flags: Flags updated_at: Date title: Title description: Description + actions: Actions hide: Hide - mark_as_reviewed: Mark as reviewed - reviewed: Reviewed + archive: Archive + archived: Archived filter: Filter filters: all: All pending_review: Pending - reviewed: Reviewed - + archived: Archived diff --git a/config/locales/moderation.es.yml b/config/locales/moderation.es.yml index 2afaec7a9..61d6b5f5c 100644 --- a/config/locales/moderation.es.yml +++ b/config/locales/moderation.es.yml @@ -8,7 +8,7 @@ es: title: Moderación comments: index: - title: Comentarios Denunciados como Inapropiados + title: Comentarios denunciados como inapropiados headers: flags: Denuncias updated_at: Fecha @@ -16,28 +16,27 @@ es: commentable: Raíz comment: Comentario hide: Ocultar - mark_as_reviewed: Marcar como revisado - reviewed: Revisado + archive: Archivar + archived: Archivado filter: Filtrar filters: all: Todos pending_review: Pendientes - reviewed: Revisados + archived: Archivados debates: index: - title: Debates Denunciados como Inapropiados + title: Debates denunciados como inapropiados headers: flags: Denuncias updated_at: Fecha title: Título description: Descripción + actions: Acciones hide: Ocultar - mark_as_reviewed: Marcar como revisado - reviewed: Revisado + archive: Archivar + archived: Archivado filter: Filtrar filters: all: Todos pending_review: Pendientes - reviewed: Revisados - - + archived: Archivados From 8bdf03c50d17dd5ad2c9ee19a7b7cbff87fe4ef0 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 16:02:36 +0200 Subject: [PATCH 05/17] Changes some test for moderation --- .../_flag_as_inappropiate_actions.html.erb | 4 +-- config/locales/en.yml | 2 +- spec/features/comments_spec.rb | 14 +++++----- spec/features/moderation/comments_spec.rb | 28 +++++++++---------- spec/features/moderation/debates_spec.rb | 28 +++++++++---------- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index 0b62715e3..07440f600 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -5,7 +5,7 @@ <% end %> @@ -17,7 +17,7 @@ <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 55e06af4e..98ac387fc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -134,7 +134,7 @@ en: shared: tags_cloud: tags: Topics - flag_as_inappropiate: Flag as inappropiate + flag_as_inappropiate: Flag as inappropriate undo_flag_as_inappropiate: Undo flag collective: Collective mailer: diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb index 4ed16d915..b1b09a777 100644 --- a/spec/features/comments_spec.rb +++ b/spec/features/comments_spec.rb @@ -133,7 +133,7 @@ feature 'Comments' do expect(page).to have_css(".comment.comment.comment.comment.comment.comment.comment.comment") end - scenario "Flagging as inappropiate", :js do + scenario "Flagging as inappropriate", :js do user = create(:user) debate = create(:debate) comment = create(:comment, commentable: debate) @@ -142,15 +142,15 @@ feature 'Comments' do visit debate_path(debate) within "#comment_#{comment.id}" do - expect(page).to_not have_link "Undo flag as inappropiate" - click_on 'Flag as inappropiate' - expect(page).to have_link "Undo flag as inappropiate" + expect(page).to_not have_link "Undo flag as inappropriate" + click_on 'Flag as inappropriate' + expect(page).to have_link "Undo flag as inappropriate" end expect(InappropiateFlag.flagged?(user, comment)).to be end - scenario "Undoing flagging as inappropiate", :js do + scenario "Undoing flagging as inappropriate", :js do user = create(:user) debate = create(:debate) comment = create(:comment, commentable: debate) @@ -160,9 +160,9 @@ feature 'Comments' do visit debate_path(debate) within "#comment_#{comment.id}" do - expect(page).to_not have_link("Flag as inappropiate", exact: true) + expect(page).to_not have_link("Flag as inappropriate", exact: true) click_on 'Undo flag as inappropiate' - expect(page).to have_link("Flag as inappropiate", exact: true) + expect(page).to have_link("Flag as inappropriate", exact: true) end expect(InappropiateFlag.flagged?(user, comment)).to_not be diff --git a/spec/features/moderation/comments_spec.rb b/spec/features/moderation/comments_spec.rb index 5a4100f77..91ed0b083 100644 --- a/spec/features/moderation/comments_spec.rb +++ b/spec/features/moderation/comments_spec.rb @@ -104,43 +104,43 @@ feature 'Moderate Comments' do visit moderation_comments_path expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_comments_path(filter: 'all') expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_comments_path(filter: 'pending_review') expect(page).to have_link('All') expect(page).to_not have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') - visit moderation_comments_path(filter: 'reviewed') + visit moderation_comments_path(filter: 'archived') expect(page).to have_link('All') expect(page).to have_link('Pending') - expect(page).to_not have_link('Reviewed') + expect(page).to_not have_link('Archived') end scenario "Filtering comments" do create(:comment, :flagged_as_inappropiate, body: "Pending comment") create(:comment, :flagged_as_inappropiate, :hidden, body: "Hidden comment") - create(:comment, :flagged_as_inappropiate, :reviewed, body: "Reviewed comment") + create(:comment, :flagged_as_inappropiate, :reviewed, body: "Archived comment") visit moderation_comments_path(filter: 'all') expect(page).to have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to have_content('Reviewed comment') + expect(page).to have_content('Archived comment') visit moderation_comments_path(filter: 'pending_review') expect(page).to have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to_not have_content('Reviewed comment') + expect(page).to_not have_content('Archived comment') - visit moderation_comments_path(filter: 'reviewed') + visit moderation_comments_path(filter: 'archived') expect(page).to_not have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to have_content('Reviewed comment') + expect(page).to have_content('Archived comment') end scenario "Reviewing links remember the pagination setting and the filter" do @@ -149,7 +149,7 @@ feature 'Moderate Comments' do visit moderation_comments_path(filter: 'pending_review', page: 2) - click_link('Mark as reviewed', match: :first) + click_link('Archive', match: :first) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys @@ -172,7 +172,7 @@ feature 'Moderate Comments' do expect(page).to have_content('spammy spam') expect(page).to have_content('1') expect(page).to have_link('Hide') - expect(page).to have_link('Mark as reviewed') + expect(page).to have_link('Archive') end end @@ -189,13 +189,13 @@ feature 'Moderate Comments' do scenario 'Marking the comment as reviewed' do within("#comment_#{@comment.id}") do - click_link('Mark as reviewed') + click_link('Archive') end expect(current_path).to eq(moderation_comments_path) within("#comment_#{@comment.id}") do - expect(page).to have_content('Reviewed') + expect(page).to have_content('Archived') end expect(@comment.reload).to be_reviewed diff --git a/spec/features/moderation/debates_spec.rb b/spec/features/moderation/debates_spec.rb index 1ea3101e0..9a2dfbd24 100644 --- a/spec/features/moderation/debates_spec.rb +++ b/spec/features/moderation/debates_spec.rb @@ -47,43 +47,43 @@ feature 'Moderate debates' do visit moderation_debates_path expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_debates_path(filter: 'all') expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_debates_path(filter: 'pending_review') expect(page).to have_link('All') expect(page).to_not have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') - visit moderation_debates_path(filter: 'reviewed') + visit moderation_debates_path(filter: 'archived') expect(page).to have_link('All') expect(page).to have_link('Pending') - expect(page).to_not have_link('Reviewed') + expect(page).to_not have_link('Archived') end scenario "Filtering debates" do create(:debate, :flagged_as_inappropiate, title: "Pending debate") create(:debate, :flagged_as_inappropiate, :hidden, title: "Hidden debate") - create(:debate, :flagged_as_inappropiate, :reviewed, title: "Reviewed debate") + create(:debate, :flagged_as_inappropiate, :reviewed, title: "Archived debate") visit moderation_debates_path(filter: 'all') expect(page).to have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to have_content('Reviewed debate') + expect(page).to have_content('Archived debate') visit moderation_debates_path(filter: 'pending_review') expect(page).to have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to_not have_content('Reviewed debate') + expect(page).to_not have_content('Archived debate') - visit moderation_debates_path(filter: 'reviewed') + visit moderation_debates_path(filter: 'archived') expect(page).to_not have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to have_content('Reviewed debate') + expect(page).to have_content('Archived debate') end scenario "Reviewing links remember the pagination setting and the filter" do @@ -92,7 +92,7 @@ feature 'Moderate debates' do visit moderation_debates_path(filter: 'pending_review', page: 2) - click_link('Mark as reviewed', match: :first) + click_link('Archive', match: :first) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys @@ -114,7 +114,7 @@ feature 'Moderate debates' do expect(page).to have_content('buy buy buy') expect(page).to have_content('1') expect(page).to have_link('Hide') - expect(page).to have_link('Mark as reviewed') + expect(page).to have_link('Archive') end end @@ -131,13 +131,13 @@ feature 'Moderate debates' do scenario 'Marking the debate as reviewed' do within("#debate_#{@debate.id}") do - click_link('Mark as reviewed') + click_link('Archive') end expect(current_path).to eq(moderation_debates_path) within("#debate_#{@debate.id}") do - expect(page).to have_content('Reviewed') + expect(page).to have_content('Archived') end expect(@debate.reload).to be_reviewed From 7d17209be63e8eaf4c7e18ed1bb10d5ff78e43ab Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 16:47:53 +0200 Subject: [PATCH 06/17] Adds styles for organization success registration [#226] --- app/assets/stylesheets/participacion.scss | 22 ++++++++++++++++-- app/assets/stylesheets/variables.scss | 1 + .../registrations/success.html.erb | 23 ++++++++++++------- config/locales/devise_views.en.yml | 12 ++++------ config/locales/devise_views.es.yml | 11 ++++----- 5 files changed, 46 insertions(+), 23 deletions(-) diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index e6aea4db2..9d5487ac9 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -150,6 +150,19 @@ h1, h2, h3, h4, h5, h6 { } } +.margin { + margin-top: $line-height; + margin-bottom: $line-height; +} + +.margin-top { + margin-top: $line-height; +} + +.margin-bottom { + margin-bottom: $line-height; +} + // 04. Header // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -494,9 +507,14 @@ footer { h2 { clear: both; - font-size: rem-calc(30); + font-size: rem-calc(18); font-weight: bold; - line-height: $line-height*2; + line-height: $line-height; + + @media (min-width: $small-breakpoint) { + font-size: rem-calc(30); + line-height: $line-height*2; + } } .back, .icon-angle-left { diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 93107e3d2..7d4baeff4 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -83,6 +83,7 @@ $comment-level-5: rgba(255,241,204,1); // 06. Responsive // - - - - - - - - - - - - - - - - - - - - - - - - - +$small: em-calc(480); $small-breakpoint: em-calc(640); $medium-breakpoint: em-calc(1024); $large-breakpoint: em-calc(1440); diff --git a/app/views/organizations/registrations/success.html.erb b/app/views/organizations/registrations/success.html.erb index 91c377102..d4c0953f6 100644 --- a/app/views/organizations/registrations/success.html.erb +++ b/app/views/organizations/registrations/success.html.erb @@ -1,8 +1,15 @@ -

    <%= t('devise_views.organizations.registrations.success.title') %>

    - -

    <%= t('devise_views.organizations.registrations.success.thank_you') %>

    - -

    <%= t('devise_views.organizations.registrations.success.instructions') %>

    - -

    <%= link_to t('devise_views.organizations.registrations.success.back_to_index'), root_path %>

    - +
    +
    +
    +

    <%= t("devise_views.organizations.registrations.success.title") %>

    +

    <%= raw t("devise_views.organizations.registrations.success.thank_you") %>

    +

    <%= raw t("devise_views.organizations.registrations.success.instructions_1") %>

    +

    <%= raw t("devise_views.organizations.registrations.success.instructions_2") %>

    +

    <%= raw t("devise_views.organizations.registrations.success.instructions_3") %>

    +

    + <%= link_to t("devise_views.organizations.registrations.success.back_to_index"), + root_path, class: "button radius small margin-top" %> +

    +
    +
    +
    diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 394c3611c..0a459ffbf 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -67,13 +67,11 @@ en: password_confirmation_label: "Confirm password" submit: "Sign up" success: - title: "Registration of organization / collective pending verification" - thank_you: "Thank you for registering your organization or collective in the website." - instructions: - We will contact you soon in order to verify that you represent your collective. - Meanwhile, please review your email. We have sent you a confirmation link which you - will have to click in order to activate your account. You will then be able to participate - as a non-verified organization. + title: "Registration of organization / collective" + thank_you: "Thank you for registering your organization or collective in the website. Now is pending verification." + instructions_1: "We will contact you soon in order to verify that you represent your collective." + instructions_2: "Meanwhile, review your email. We have sent you a confirmation link to activate your account." + instructions_3: "When you confirm your account will then be able to participate as a non-verified organization." back_to_index: "Ok, go back to index" sessions: new: diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index e27065038..2d582fde9 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -67,12 +67,11 @@ es: password_confirmation_label: "Confirmar contraseña" submit: "Registrarse" success: - title: "Registro de organización / colectivo pendiente de verificación" - thank_you: "Gracias por registrar tu colectivo en la web." - instructions: - En breve nos pondremos en contacto contigo para verificar que realmente representas a un colectivo. - Entretanto, por favor revisa tu correo electrónico. Te hemos enviado un enlace que debes pulsar para confirmar - tu correo. Una vez confirmado, podrás empezar a participar como colectivo no verificado. + title: "Registro de organización / colectivo" + thank_you: "Gracias por registrar tu colectivo en la web. Ahora está pendiente de verificación." + instructions_1: "En breve nos pondremos en contacto contigo para verificar que realmente representas a este colectivo." + instructions_2: "Mientras revisa tu correo electrónico, te hemos enviado un enlace para confirmartu cuenta." + instructions_3: "Una vez confirmado, podrás empezar a participar como colectivo no verificado." back_to_index: "Entendido, volver a la página principal" sessions: new: From f47fbe82d5b0c6b5ade7f3e3f98e4a0b154dba83 Mon Sep 17 00:00:00 2001 From: kikito Date: Tue, 25 Aug 2015 19:22:57 +0200 Subject: [PATCH 07/17] Uses *_html tags instead of calling raw in the view --- app/views/organizations/registrations/success.html.erb | 8 ++++---- config/locales/devise_views.en.yml | 6 +++--- config/locales/devise_views.es.yml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/organizations/registrations/success.html.erb b/app/views/organizations/registrations/success.html.erb index d4c0953f6..e246365f5 100644 --- a/app/views/organizations/registrations/success.html.erb +++ b/app/views/organizations/registrations/success.html.erb @@ -2,10 +2,10 @@

    <%= t("devise_views.organizations.registrations.success.title") %>

    -

    <%= raw t("devise_views.organizations.registrations.success.thank_you") %>

    -

    <%= raw t("devise_views.organizations.registrations.success.instructions_1") %>

    -

    <%= raw t("devise_views.organizations.registrations.success.instructions_2") %>

    -

    <%= raw t("devise_views.organizations.registrations.success.instructions_3") %>

    +

    <%= t("devise_views.organizations.registrations.success.thank_you") %>

    +

    <%= t("devise_views.organizations.registrations.success.instructions_1_html") %>

    +

    <%= t("devise_views.organizations.registrations.success.instructions_2_html") %>

    +

    <%= t("devise_views.organizations.registrations.success.instructions_3_html") %>

    <%= link_to t("devise_views.organizations.registrations.success.back_to_index"), root_path, class: "button radius small margin-top" %> diff --git a/config/locales/devise_views.en.yml b/config/locales/devise_views.en.yml index 0a459ffbf..f0e1eb33a 100644 --- a/config/locales/devise_views.en.yml +++ b/config/locales/devise_views.en.yml @@ -69,9 +69,9 @@ en: success: title: "Registration of organization / collective" thank_you: "Thank you for registering your organization or collective in the website. Now is pending verification." - instructions_1: "We will contact you soon in order to verify that you represent your collective." - instructions_2: "Meanwhile, review your email. We have sent you a confirmation link to activate your account." - instructions_3: "When you confirm your account will then be able to participate as a non-verified organization." + instructions_1_html: "We will contact you soon in order to verify that you represent your collective." + instructions_2_html: "Meanwhile, review your email. We have sent you a confirmation link to activate your account." + instructions_3_html: "When you confirm your account will then be able to participate as a non-verified organization." back_to_index: "Ok, go back to index" sessions: new: diff --git a/config/locales/devise_views.es.yml b/config/locales/devise_views.es.yml index 2d582fde9..49d304748 100644 --- a/config/locales/devise_views.es.yml +++ b/config/locales/devise_views.es.yml @@ -69,9 +69,9 @@ es: success: title: "Registro de organización / colectivo" thank_you: "Gracias por registrar tu colectivo en la web. Ahora está pendiente de verificación." - instructions_1: "En breve nos pondremos en contacto contigo para verificar que realmente representas a este colectivo." - instructions_2: "Mientras revisa tu correo electrónico, te hemos enviado un enlace para confirmartu cuenta." - instructions_3: "Una vez confirmado, podrás empezar a participar como colectivo no verificado." + instructions_1_html: "En breve nos pondremos en contacto contigo para verificar que realmente representas a este colectivo." + instructions_2_html: "Mientras revisa tu correo electrónico, te hemos enviado un enlace para confirmar tu cuenta." + instructions_3_html: "Una vez confirmado, podrás empezar a participar como colectivo no verificado." back_to_index: "Entendido, volver a la página principal" sessions: new: From 70b40b6ce8753db2779cac6349201640e6cebb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 25 Aug 2015 21:58:38 -0300 Subject: [PATCH 08/17] simplifies redundant commands in README Use either `bundle exec` or bundler generated binstubs, but not both. Since you are committing binstubs to source control, I assume you want the latter. --- README.md | 8 ++++---- README_EN.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 87e0d1ab9..a3433df9d 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,13 @@ cd participacion bundle install cp config/database.yml.example config/database.yml cp config/secrets.yml.example config/secrets.yml -bundle exec bin/rake db:setup -RAILS_ENV=test bundle exec rake db:setup +bin/rake db:setup +RAILS_ENV=test bin/rake db:setup ``` Para ejecutar la aplicación en local: ``` -bundle exec bin/rails s +bin/rails s ``` Prerequisitos para los tests: tener instalado PhantomJS >= 2.0 @@ -41,7 +41,7 @@ Prerequisitos para los tests: tener instalado PhantomJS >= 2.0 Para ejecutar los tests: ``` -bundle exec bin/rspec +bin/rspec ``` ### OAuth diff --git a/README_EN.md b/README_EN.md index 9ebc58731..a3dd63106 100644 --- a/README_EN.md +++ b/README_EN.md @@ -28,13 +28,13 @@ cd participacion bundle install cp config/database.yml.example config/database.yml cp config/secrets.yml.example config/secrets.yml -bundle exec bin/rake db:setup -RAILS_ENV=test bundle exec rake db:setup +bin/rake db:setup +RAILS_ENV=test bin/rake db:setup ``` Run the app locally: ``` -bundle exec bin/rails s +bin/rails s ``` Prerequisites for testing: install PhantomJS >= 2.0 @@ -42,7 +42,7 @@ Prerequisites for testing: install PhantomJS >= 2.0 Run the tests with: ``` -bundle exec bin/rspec +bin/rspec ``` ## Licence From 98c6f6561c9ed85bcb99bac32815f6c3ddcaf469 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 26 Aug 2015 11:37:41 +0200 Subject: [PATCH 09/17] removes force ssl in staging env --- config/environments/staging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 7a21a1df4..e84606f73 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -42,7 +42,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true + # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. From 1a806db80db7221de657b02edb44fa408bf7703a Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 26 Aug 2015 11:46:09 +0200 Subject: [PATCH 10/17] removes ssl from production env --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 7a21a1df4..e84606f73 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -42,7 +42,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true + # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. From 30d996da845c0410b57274c91c00638e87a2e158 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 26 Aug 2015 12:00:34 +0200 Subject: [PATCH 11/17] force ssl in staging --- config/environments/staging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index e84606f73..7a21a1df4 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -42,7 +42,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. From c13aea5f1d9bedae45dea9fc0899a00d610adde3 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 26 Aug 2015 12:03:28 +0200 Subject: [PATCH 12/17] removes force ssl from staging --- config/environments/staging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 7a21a1df4..e84606f73 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -42,7 +42,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = true + # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. From e219e5be4d737de98d8762cfdc08f34c6d140b3c Mon Sep 17 00:00:00 2001 From: rgarcia Date: Wed, 26 Aug 2015 12:22:58 +0200 Subject: [PATCH 13/17] adds force ssl to staging --- config/environments/staging.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/staging.rb b/config/environments/staging.rb index e84606f73..7a21a1df4 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -42,7 +42,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. From 46bd0f2c7f9d4cd244da41a4ce80ed325e9cb418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 26 Aug 2015 12:24:37 +0200 Subject: [PATCH 14/17] adds basic style/content to moderation dashboard --- app/views/moderation/_menu.html.erb | 4 ++-- app/views/moderation/dashboard/index.html.erb | 6 +++++- app/views/shared/_tags.html.erb | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/moderation/_menu.html.erb b/app/views/moderation/_menu.html.erb index 41e84287a..3971b3b51 100644 --- a/app/views/moderation/_menu.html.erb +++ b/app/views/moderation/_menu.html.erb @@ -6,14 +6,14 @@

  • > <%= link_to moderation_debates_path do %> - + <%= t('moderation.menu.flagged_debates') %> <% end %>
  • > <%= link_to moderation_comments_path do %> - + <%= t('moderation.menu.flagged_comments') %> <% end %>
  • diff --git a/app/views/moderation/dashboard/index.html.erb b/app/views/moderation/dashboard/index.html.erb index 16eb4508f..df41493e6 100644 --- a/app/views/moderation/dashboard/index.html.erb +++ b/app/views/moderation/dashboard/index.html.erb @@ -1 +1,5 @@ -

    <%= t("moderation.dashboard.index.title") %>

    +

    <%= t("moderation.dashboard.index.title") %>

    + +

    Lorem ipsum moderator sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

    + +

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.

    diff --git a/app/views/shared/_tags.html.erb b/app/views/shared/_tags.html.erb index 6a61bd4b4..2b599ec77 100644 --- a/app/views/shared/_tags.html.erb +++ b/app/views/shared/_tags.html.erb @@ -10,4 +10,4 @@ <%= link_to "#{debate.tags_count_out_of_limit(limit)}+", debate_path(debate) %> <% end %> -<% end %> +<% end %> \ No newline at end of file From 5eeb89584b6563a9de58fd1769d7d9328cd19ba2 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 26 Aug 2015 13:14:07 +0200 Subject: [PATCH 15/17] Fixes a couple specs which fail with the new words (ArchiveD vs Archive) --- spec/features/moderation/comments_spec.rb | 2 +- spec/features/moderation/debates_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/moderation/comments_spec.rb b/spec/features/moderation/comments_spec.rb index 91ed0b083..ba40598d8 100644 --- a/spec/features/moderation/comments_spec.rb +++ b/spec/features/moderation/comments_spec.rb @@ -149,7 +149,7 @@ feature 'Moderate Comments' do visit moderation_comments_path(filter: 'pending_review', page: 2) - click_link('Archive', match: :first) + click_link('Archive', match: :first, exact: true) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys diff --git a/spec/features/moderation/debates_spec.rb b/spec/features/moderation/debates_spec.rb index 9a2dfbd24..d27a5b9fc 100644 --- a/spec/features/moderation/debates_spec.rb +++ b/spec/features/moderation/debates_spec.rb @@ -92,7 +92,7 @@ feature 'Moderate debates' do visit moderation_debates_path(filter: 'pending_review', page: 2) - click_link('Archive', match: :first) + click_link('Archive', match: :first, exact: true) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys From 015fe704e4afcaab689e7f07cdb6d5a2ba3e0ff1 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 26 Aug 2015 13:14:42 +0200 Subject: [PATCH 16/17] Fixes flagging specs by making them id-based instead of text-based --- .../_flag_as_inappropiate_actions.html.erb | 12 ++++++------ .../_flag_as_inappropiate_actions.html.erb | 12 ++++++------ spec/features/comments_spec.rb | 16 +++++++++------- spec/features/debates_spec.rb | 14 ++++++++------ 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index 07440f600..9fba8b5b2 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -1,23 +1,23 @@ <% if can? :flag_as_inappropiate, comment %>  |  - -