From 43ee2144c1a59e80ccd9b23cc912fd3a863f30a0 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 17 Aug 2015 21:29:44 +0200 Subject: [PATCH 1/4] Updates custom icons font --- app/assets/fonts/icons.eot | Bin 4288 -> 4428 bytes app/assets/fonts/icons.svg | 1 + app/assets/fonts/icons.ttf | Bin 4132 -> 4272 bytes app/assets/fonts/icons.woff | Bin 3140 -> 3256 bytes app/assets/stylesheets/icons.scss | 3 +++ 5 files changed, 4 insertions(+) diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot index 166eca82eabc4822b692676a13762ad42d837c2b..069a97a8bccd73b59f64bbc46313ccf2705e9c47 100644 GIT binary patch delta 495 zcmX@0ct(lUN05PG!$ekd7J;4NDia-Yll>G885jhnFfcI4xVyNzG1xP(0r@3BzJh0>Gcq$#WAvRhQAxF9S%<39%&t6M-aHVonU`NiMns;6)gr*c zg7H9Vv}bs@XY_49BO^Z`p2W%{FCrtu&#Pepln1$yfq`f88NT<7=9BmEYXZq<{KY_j YMhPf02LoMPBOnWO@hkypZltgP0Q+HZhyVZp delta 373 zcmX@3bU=~yfB*x7%0yOk7Ke+52PQh?Cc90`W?&HDU|?X7ad&ZbW3XdjV_@Ka0pu(A z2kRU8|Bl(rz`z&*;`E9;3a5Dh~7#J>oe!c@n zPoBeQ%P2Vc7Go@9-ee1=U~Lzm>p=Qs7+4rUwz2_fMh1|^JfO=#AQ43WU&O#Tc^^~F zWGCjylbAUsUuBlw{Dt`;*W^I{PmCs$T?90NWS&4V(CkM7%9A+-Wz+?L=CA*+l>gVO^a7 diff --git a/app/assets/fonts/icons.svg b/app/assets/fonts/icons.svg index 498eb27a7..8532ba86c 100644 --- a/app/assets/fonts/icons.svg +++ b/app/assets/fonts/icons.svg @@ -21,4 +21,5 @@ + diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf index 285caed395a35383396a4f1a47403d1d3a3e9f41..37dde64baee432a645b188a2cecfab35e64756c8 100644 GIT binary patch delta 508 zcmZ3YutBk&fsuiMftR6yftew|%`L>Y*iX@rfk9vjP*ld<#np|$o`DU>F9Gru{Dbw4 z{C~%6Wnf^80P@3o~k~*8Hh?tR?i5jEttcgmh9m_gYm1cJ3@$%+@h|RqG zGBP6aJggQ078Z;LQlmY?!#$&K`xzPe0r4bO9(fTN8Gc?33!ps6oeT^-lMVRZGn!9U h;MW9_Ui`&CzwYB#W)23r`T@Tz(AEF=rMZ!U0|2V|Z#@72 delta 361 zcmdm>xJ03zfsuiMftR6yftew|%`L>Y*lk)i1A_nuP*ld<#np|$j)9GVf&T@Nuizi7 zZ{+_wW-|i=V+4>NmYkbdpz%ks5y-y-#9rx%#RdQW15IM!e*l!{NYANEyP@zRh=GCG zhk=3XK}Kp~3M-pHE>I4rp1~|5BXwfEOsZB+esZGVDG@!OIt`$>N^W9B0Ye1C1fZD~ zK)ym=Vs0v*MdvLB20k62SYAPXaS4+YlK{}3IY4CF+$54k39<@>~FGI<5RCXl?uUko(dO+a~au7C`qz~n9g IX>KID0YKnd3IG5A diff --git a/app/assets/fonts/icons.woff b/app/assets/fonts/icons.woff index 02c11f23e527185c1280b3572d7b89493bde52db..aeda5c38412a627e7009af9ae99fc0933fbeed87 100644 GIT binary patch delta 3114 zcmV+_4At|*7`Pb}cTYw}PgGP-000cQ01E&B000s+krX3;dH?_oa3dBYKt@JXO#lE2 zga7~l8UO$Q9CJ<~F-Js2MgRZ`pa1{>9RL6TAOJl81W!{hG5`PyzyJUMMF0Q*U{D=i z)?;m9Z~y=c2mk;8Pyhe{QXr!$SZHNoWB>pQSO5S3DF6TfHU$lvGiYdKVE_ONga7~l z7ytkOBm^&i0t0Amba(&&3!DG|03-ka03-$W0iA7OcyIs!3%~#X00sa600saMPylXW zZDjxe3&;Qf0Nnrp0d5XEiQRB-b94Xz45$DA01yBG03ZMZ00DTMg;r~b9akNnP43)# zx?N)}xuM07t!>ShfcfADDWRbCmAX|UN~zRGu_mE^A!f~PHradk&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N7v%XPVXu z8-)+be3Pa}6=Ji8_OhaLA4Uk>;@a}Bi`5;hRpbeQcT6eXl8!hqAQWF(^PaSfco_7q zeeuR(+QE9&_~Y(!&&! zqLC^$?z-WWhMhqsqgN)$p~KIVlv-u}x`?aahU&{zDDd8H{D zBO5O;J7(f-;-TPHpwa0(^|x-1`t!{IH8HO!q&GDfChNS)qmo;z1?6ga)tdPvzP#&R ztOo2heHn{OcJz&3S{g4EfJ?}8d^w{~u6_CL{@@SeTLi1u-(h?x zakutt_mW8nN2h5+KD+g=V8wvsEpm#RlK%_x%w4#U2 ztV@h}cN@!J$xKBV#CFJ5?)>lN-wqSX6nCI1VaDFY*WUcTp$7J?;Uh}wet&UrP_4V3 z+-ql8gBcx`Wl%@BOFYCb2WT7)taP8*TFnTkq&#bsR%K!(_w3<7v2%PW>JQpU_tV?o z^=+7zc)+B zL7fFTDE-&x4ybU~sQK?CzYu5F_?aq*AXQNSI|*#P`^(bLs+p4pv~jo;PXmBmnB${Rw511w8`L2etD z8rbJS+&G5BNeJbLBC!w-1Y}f=^Ut^Mf3@DRt_U_0Hhw&03*JE#X5*0>Vk<`=@?)R0 z9v^qe3mR-6vs&+9UiJ0H&W~^*RaNS$YimOBA;I*Gtx*~(2Li~ZvETjE#W)4vzMS?z zb@La>1@WQ)j+y_ovZBMAVkkB~&1f?x&)pZV%^3^E(4{%8U8zi=R?H zyAZw+Hv4rApYOHN6f!Al?BOgICX4uVI^+&4YuL|=B_^g`jd^;|MtDa#bxOhRBzf8K zG!dljk7$qEHaJrA9|qo1X%wAPYHh- diff --git a/app/assets/stylesheets/icons.scss b/app/assets/stylesheets/icons.scss index cfebe4e83..616c037cd 100644 --- a/app/assets/stylesheets/icons.scss +++ b/app/assets/stylesheets/icons.scss @@ -79,3 +79,6 @@ .icon-star:before { content: "n"; } +.icon-eye:before { + content: "p"; +} From 0df1524f0d127de603f090f2e81e080dd79c5867 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 17 Aug 2015 21:30:07 +0200 Subject: [PATCH 2/4] Creates SCSS for admin --- app/assets/stylesheets/admin.scss | 153 ++++++++++++++++++++++++ app/assets/stylesheets/application.scss | 1 + 2 files changed, 154 insertions(+) create mode 100644 app/assets/stylesheets/admin.scss diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss new file mode 100644 index 000000000..f35811ecf --- /dev/null +++ b/app/assets/stylesheets/admin.scss @@ -0,0 +1,153 @@ +// Table of Contents +// +// 01. Global styles +// 02. Sidebar +// 03. List elements +// + +// 01. Global styles +// - - - - - - - - - - - - - - - - - - - - - - - - - + +body.admin { + background: white; + + h2 { + font-size: rem-calc(24); + font-weight: bold; + } + + form { + .button { + margin-top: 0; + } + } + + .button.secondary { + margin-right: rem-calc(12); + } + + .button.create { + background: #EFD90C; + color: $text; + + &:hover { + background: #BDAB09; + } + } + + .admin-content { + margin-top: rem-calc(24); + } + + .is-featured { + margin-top: rem-calc(36); + } +} + +// 02. Sidebar +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.admin-sidebar { + margin-left: rem-calc(-15); + margin-top: rem-calc(-48); + + ul { + list-style-type: none; + margin-left: 0; + padding: 0; + + [class^="icon-"] { + display: inline-block; + font-size: rem-calc(24); + padding-right: rem-calc(24); + padding-top: rem-calc(4); + } + + li { + background: #2E343F; + border-bottom: 1px solid #292f39; + border-top: 1px solid #353c49; + margin: 0; + outline: 0; + + &:first-child { + background: #2B3139; + color: rgba(255,255,255,0.3); + padding: rem-calc(24) rem-calc(12); + text-transform: uppercase; + } + + &.active{ + background: #373D47; + + a:not(.button) { + color: white; + } + } + } + + li a:not(.button) { + color: rgba(255,255,255,0.3); + line-height: rem-calc(48); + padding-left: rem-calc(12); + vertical-align: top; + + &:hover { + color: white; + } + } + } +} + +// 03. List elements +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.admin-list { + list-style-type: none; + margin: 0; + + form { + clear: both; + + .checkbox { + font-size: rem-calc(12); + } + } + + li { + border-bottom: 1px solid #E7E9EC; + font-size: rem-calc(14); + min-height: rem-calc(72); + padding: rem-calc(12); + + &:first-child { + border-top: 1px solid #E7E9EC; + } + + &:nth-child(odd) { + background: #F0F2F6; + } + } + + .tag { + float: left; + font-size: rem-calc(18); + padding: 0; + } + + .button { + margin: 0; + } +} + +.delete { + border-bottom: 1px dotted #CF2A0E; + color: #F04124; + font-size: rem-calc(11); + margin-right: rem-calc(12); + + &:hover, &:active, &:focus { + border: 0; + color: #cf2a0e; + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index e4379397e..fdc423289 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -6,5 +6,6 @@ @import "fonts"; @import "icons"; @import "variables"; +@import "admin"; @import "participacion"; @import "debates"; From 0c2901c3fb4f7c9b4f7d26df2166255ece94bb10 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Mon, 17 Aug 2015 21:30:22 +0200 Subject: [PATCH 3/4] Adds styles for admin --- app/views/admin/_menu.html.erb | 33 +++++++++++-- app/views/admin/comments/index.html.erb | 30 +++++++----- app/views/admin/dashboard/index.html.erb | 6 ++- app/views/admin/debates/index.html.erb | 24 +++++----- app/views/admin/debates/show.html.erb | 21 ++++---- app/views/admin/tags/index.html.erb | 61 +++++++++++++++--------- app/views/layouts/_admin_header.html.erb | 8 +--- app/views/layouts/admin.html.erb | 30 +++++++----- config/locales/admin.en.yml | 3 +- config/locales/admin.es.yml | 2 + 10 files changed, 133 insertions(+), 85 deletions(-) diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index 8ea2b27af..bb8e30d07 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -1,5 +1,28 @@ -
    -
  • <%= link_to t('admin.menu.debate_topics'), admin_tags_path %>
  • -
  • <%= link_to t('admin.menu.hidden_debates'), admin_debates_path %>
  • -
  • <%= link_to t('admin.menu.hidden_comments'), admin_comments_path %>
  • -
+ diff --git a/app/views/admin/comments/index.html.erb b/app/views/admin/comments/index.html.erb index 1555fda0c..9c52d8834 100644 --- a/app/views/admin/comments/index.html.erb +++ b/app/views/admin/comments/index.html.erb @@ -1,14 +1,18 @@ -
-

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

+

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

-
    - <% @comments.each do |comment| %> -
  • - <%= comment.body %> - - <%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment), - method: :put, data: { confirm: t("admin.actions.confirm") } %> -
  • - <% end %> -
-
+
    + <% @comments.each do |comment| %> +
  • +
    +
    + <%= comment.body %> +
    +
    + <%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment), + method: :put, data: { confirm: t("admin.actions.confirm") }, + class: "button radius tiny success right" %> +
    +
    +
  • + <% end %> +
diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index ffc8a281a..8cea6ce36 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -1 +1,5 @@ -

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

+

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

+ +

Lorem ipsum dolor 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/admin/debates/index.html.erb b/app/views/admin/debates/index.html.erb index ce07205b3..e7e1e5753 100644 --- a/app/views/admin/debates/index.html.erb +++ b/app/views/admin/debates/index.html.erb @@ -1,13 +1,13 @@ -
-

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

+

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

-
    - <% @debates.each do |debate| %> - <%= link_to admin_debate_path(debate) do %> -
  • - <%= link_to debate.title, admin_debate_path(debate) %> -
  • - <% end %> - <% end %> -
-
\ No newline at end of file +
    + <% @debates.each do |debate| %> +
  • + <%= link_to debate.title, admin_debate_path(debate) %> + + <%= link_to t("admin.actions.restore"), restore_admin_debate_path(debate), + method: :put, data: { confirm: t("admin.actions.confirm") }, + class: "button radius tiny success right" %> +
  • + <% end %> +
diff --git a/app/views/admin/debates/show.html.erb b/app/views/admin/debates/show.html.erb index aaa22eec9..e740baf47 100644 --- a/app/views/admin/debates/show.html.erb +++ b/app/views/admin/debates/show.html.erb @@ -1,13 +1,12 @@ -
-

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

+

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

-
-
<%= @debate.title %>
-
<%= @debate.description %>
+

<%= @debate.title %>

-
- <%= link_to t('admin.actions.restore'), restore_admin_debate_path(@debate), - method: :put, data: { confirm: t('admin.actions.confirm') } %> -
-
-
\ No newline at end of file +
<%= @debate.description %>
+ +<%= link_to t("admin.debates.show.back"), admin_debates_path, + class: "button radius small secondary" %> + +<%= link_to t("admin.actions.restore"), restore_admin_debate_path(@debate), + method: :put, data: { confirm: t("admin.actions.confirm") }, + class: "button radius small success" %> diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb index 4dbbed167..d8090aa41 100644 --- a/app/views/admin/tags/index.html.erb +++ b/app/views/admin/tags/index.html.erb @@ -1,29 +1,46 @@ -
-

<%= t("admin.tags.index.add_tag") %>

+

<%= t("admin.tags.index.add_tag") %>

- <%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %> - <%= f.text_field :name, placeholder: t("admin.tags.name.placeholder") %> - <%= f.check_box :featured, label: false %> - <%= t("admin.tags.mark_as_featured") %> - <%= f.submit(class: "button radius small") %> - <% end %> +<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %> +
+
+ <%= f.label :name, t("admin.tags.name.placeholder") %> + <%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %> +
-

<%= t("admin.tags.index.title") %>

+ +
-
    - <% @tags.each do |tag| %> -
  • - <%= tag.name %> + <%= f.submit(class: "button radius create") %> - <%= form_for(tag, url: admin_tag_path(tag), as: :tag, html: { id: "edit_tag_#{tag.id}"}) do |f| %> - <%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}" %> - <%= t("admin.tags.mark_as_featured") %> - <%= f.submit(class: "button radius tiny") %> - <%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: 'button tiny alert' %> +<% end %> + +

    <%= t("admin.tags.index.title") %>

    + +
      + <% @tags.each do |tag| %> +
    • + <%= tag.name %> + + <%= form_for(tag, + url: admin_tag_path(tag), + as: :tag, + html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %> + + <%= f.label :featured do %> + <%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}", class: "left" %> + <%= t("admin.tags.mark_as_featured") %> <% end %> -
    • - <% end %> -
    -
+ <%= f.submit(class: "button radius tiny success") %> +
+ <%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "delete" %> + <% end %> + + <% end %> + diff --git a/app/views/layouts/_admin_header.html.erb b/app/views/layouts/_admin_header.html.erb index b88dcded4..ffd7d34f4 100644 --- a/app/views/layouts/_admin_header.html.erb +++ b/app/views/layouts/_admin_header.html.erb @@ -10,12 +10,6 @@ <% end %> ] - @@ -25,7 +19,7 @@
  • <%= link_to root_path do %> <%= image_tag('header_logo_madrid.png', class: 'left', size: '96x96') %> - <%= t("layouts.header.open_gov", open: "#{t('layouts.header.open')}").html_safe %> | <%= t("layouts.header.participation") %> + <%= t("layouts.header.open_gov", open: "#{t('layouts.header.open')}").html_safe %> | <%= t("admin.dashboard.index.title") %> <% end %>
  • diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index c754951f2..79ae8fcd9 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -12,22 +12,26 @@ <%= csrf_meta_tags %> - + <%= render 'layouts/admin_header' %> - <% if notice %> -

    <%= notice %>

    - <% end %> +
    - <% if alert %> -

    <%= alert %>

    - <% end %> +
    + <%= side_menu %> +
    -
    - <%= side_menu %> +
    + <% if notice %> +
    <%= notice %>
    + <% end %> + + <% if alert %> +
    <%= alert %>
    + <% end %> + + <%= yield %> +
    - - <%= yield %> - - \ No newline at end of file + diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index 42c6d375c..3f922f5eb 100644 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -27,6 +27,7 @@ en: debates: index: title: Hidden debates + show: + back: Back restore: success: The debate has been restored - diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 71062c25b..58a23bcde 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -27,5 +27,7 @@ es: debates: index: title: Debates ocultos + show: + back: Volver restore: success: El debate ha sido permitido From 67e02f08de69b9ae0b372ad7eb237873f98fc0a8 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Mon, 17 Aug 2015 22:03:30 +0200 Subject: [PATCH 4/4] fixes specs --- app/views/admin/_menu.html.erb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/views/admin/_menu.html.erb b/app/views/admin/_menu.html.erb index bb8e30d07..5ade5615a 100644 --- a/app/views/admin/_menu.html.erb +++ b/app/views/admin/_menu.html.erb @@ -24,5 +24,19 @@ <%= t('admin.menu.hidden_comments') %> <% end %> + +
  • + <%= link_to admin_officials_path do %> + + <%= t('admin.menu.officials') %> + <% end %> +
  • + +
  • + <%= link_to admin_settings_path do %> + + <%= t('admin.menu.settings') %> + <% end %> +