Adds styles for new admin's sections
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// 01. Global styles
|
||||
// 02. Sidebar
|
||||
// 03. List elements
|
||||
// 04. Stats
|
||||
//
|
||||
|
||||
// 01. Global styles
|
||||
@@ -16,6 +17,11 @@ body.admin {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: rem-calc(14);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
form {
|
||||
.button {
|
||||
margin-top: 0;
|
||||
@@ -26,15 +32,6 @@ body.admin {
|
||||
margin-right: rem-calc(12);
|
||||
}
|
||||
|
||||
.button.create {
|
||||
background: #EFD90C;
|
||||
color: $text;
|
||||
|
||||
&:hover {
|
||||
background: #BDAB09;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-content {
|
||||
margin-top: rem-calc(24);
|
||||
}
|
||||
@@ -105,6 +102,7 @@ body.admin {
|
||||
.admin-list {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
margin-bottom: rem-calc(48);
|
||||
|
||||
form {
|
||||
clear: both;
|
||||
@@ -143,11 +141,29 @@ body.admin {
|
||||
.delete {
|
||||
border-bottom: 1px dotted #CF2A0E;
|
||||
color: #F04124;
|
||||
font-size: rem-calc(11);
|
||||
margin-right: rem-calc(12);
|
||||
font-size: rem-calc(12);
|
||||
|
||||
&:hover, &:active, &:focus {
|
||||
border: 0;
|
||||
color: #cf2a0e;
|
||||
}
|
||||
}
|
||||
|
||||
.level {
|
||||
font-size: rem-calc(12);
|
||||
}
|
||||
|
||||
.official {
|
||||
background-color: #e7e7e7;
|
||||
border-radius: rem-calc(3);
|
||||
font-size: rem-calc(12);
|
||||
font-weight: normal;
|
||||
padding: rem-calc(6) rem-calc(12);
|
||||
}
|
||||
|
||||
// 04. Stats
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
.stats {
|
||||
background: white;
|
||||
}
|
||||
|
||||
@@ -366,10 +366,6 @@
|
||||
color: $text-medium;
|
||||
}
|
||||
|
||||
.bullet {
|
||||
color: $border;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: rem-calc(14);
|
||||
line-height: $line-height;
|
||||
@@ -431,6 +427,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bullet {
|
||||
color: $border;
|
||||
}
|
||||
|
||||
// 04. New
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
// 09. Alerts
|
||||
// 10. User account
|
||||
// 11. Filters
|
||||
// 12. Official levels
|
||||
//
|
||||
|
||||
// 01. Variables
|
||||
@@ -618,3 +619,30 @@ form {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 12. Officials levels
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
.level-0 {
|
||||
background: $level-0;
|
||||
}
|
||||
|
||||
.level-1 {
|
||||
background: $level-1;
|
||||
}
|
||||
|
||||
.level-2 {
|
||||
background: $level-2;
|
||||
}
|
||||
|
||||
.level-3 {
|
||||
background: $level-3;
|
||||
}
|
||||
|
||||
.level-4 {
|
||||
background: $level-4;
|
||||
}
|
||||
|
||||
.level-5 {
|
||||
background: $level-5;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,13 @@ $votes-unlike-act: #BD6A6A;
|
||||
|
||||
$check: #46DB91;
|
||||
|
||||
$level-0: #F08A24;
|
||||
$level-1: #43AC6A;
|
||||
$level-2: #43AC6A;
|
||||
$level-3: #43AC6A;
|
||||
$level-4: #43AC6A;
|
||||
$level-5: #43AC6A;
|
||||
|
||||
// 03. Forms
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
@@ -27,21 +27,21 @@
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'officials' %>>
|
||||
<%= link_to admin_officials_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<i class="icon-user"></i>
|
||||
<%= t('admin.menu.officials') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'settings' %>>
|
||||
<%= link_to admin_settings_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<i class="icon-settings"></i>
|
||||
<%= t('admin.menu.settings') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li <%= 'class=active' if controller_name == 'stats' %>>
|
||||
<%= link_to stats_path do %>
|
||||
<i class="icon-chat-bubble-two"></i>
|
||||
<i class="icon-stats"></i>
|
||||
<%= t('admin.menu.stats') %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="small-12 medium-2 column">
|
||||
<%= 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" %>
|
||||
class: "button radius small success right" %>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<h1><%= t("admin.officials.edit.title") %></h1>
|
||||
<h2>
|
||||
<%= t("admin.officials.edit.title") %>
|
||||
<span class="official right"><strong><%= @user.name %></strong> (<%= @user.email %>)</span>
|
||||
</h2>
|
||||
|
||||
<%= @user.name %> (<%= @user.email %>)
|
||||
<%= form_for @user, url: admin_official_path(@user) do |f| %>
|
||||
<%= f.text_field :official_position %>
|
||||
<%= f.select :official_level, official_level_options %>
|
||||
<%= link_to t("admin.officials.edit.back"), admin_officials_path, class: "button radius small secondary" %>
|
||||
<%= f.submit %>
|
||||
|
||||
<% if @user.official? %>
|
||||
<%= link_to t("admin.officials.edit.destroy"), admin_official_path(@user), method: :delete, class: 'button tiny alert' %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.officials.edit.cancel"), admin_officials_path, class: 'button tiny alert' %>
|
||||
<%= link_to t("admin.officials.edit.destroy"), admin_official_path(@user), method: :delete, class: 'delete' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -1,25 +1,32 @@
|
||||
<h1><%= t("admin.officials.index.title") %></h1>
|
||||
<h2><%= t("admin.officials.index.title") %></h2>
|
||||
|
||||
<div>
|
||||
<%= form_for(User.new, url: search_admin_officials_path, as: :user, method: :get) do |f| %>
|
||||
<%= text_field_tag :email, "", label: false, placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
<%= f.submit t("admin.officials.index.search") %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, "", placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
</div>
|
||||
<div class="form-inline small-12 medium-6 column">
|
||||
<%= f.submit t("admin.officials.index.search"), class: "button radius success" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= page_entries_info @officials %>
|
||||
</div>
|
||||
<h3><%= page_entries_info @officials %></h3>
|
||||
|
||||
<div>
|
||||
<ul class="admin-list">
|
||||
<% @officials.each do |official| %>
|
||||
<%= link_to official.name, edit_admin_official_path(official) %>
|
||||
<%= official.official_position %>
|
||||
<%= t("admin.officials.level_#{official.official_level}") %>
|
||||
<br/><br/>
|
||||
<% end %>
|
||||
</div>
|
||||
<li>
|
||||
<strong><%= official.name %></strong>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="level"><%= t("admin.officials.level_#{official.official_level}") %></span>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= official.official_level %>">
|
||||
<%= official.official_position %>
|
||||
</span>
|
||||
|
||||
<%= link_to official.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"), edit_admin_official_path(official), class: "button radius tiny right" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<%= paginate @officials %>
|
||||
</div>
|
||||
@@ -1,21 +1,30 @@
|
||||
<h1><%= t("admin.officials.search.title") %></h1>
|
||||
<h2><%= t("admin.officials.search.title") %></h2>
|
||||
|
||||
<div>
|
||||
<%= form_for(User.new, url: search_admin_officials_path, as: :user, method: :get) do |f| %>
|
||||
<%= text_field_tag :email, "", label: false, placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
<%= f.submit t("admin.officials.search.search") %>
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= text_field_tag :email, "", placeholder: t("admin.officials.index.search_email_placeholder") %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= f.submit t("admin.officials.search.search"), class: "button radius success" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= page_entries_info @users %>
|
||||
</div>
|
||||
<h3><%= page_entries_info @users %></h3>
|
||||
|
||||
<div>
|
||||
<% @users.each do |user| %>
|
||||
<%= link_to user.name, edit_admin_official_path(user) %>
|
||||
<%= user.official_position %>
|
||||
<%= t("admin.officials.level_#{user.official_level}") %>
|
||||
<%= link_to user.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"), edit_admin_official_path(user) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<ul class="admin-list">
|
||||
<% @users.each do |user| %>
|
||||
<li>
|
||||
<strong><%= user.name %></strong>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="label round level-<%= user.official_level %>">
|
||||
<%= user.official_position %>
|
||||
</span>
|
||||
<span class="bullet"> • </span>
|
||||
<span class="level"><%= t("admin.officials.level_#{user.official_level}") %></span>
|
||||
|
||||
<%= link_to user.official? ? t("admin.officials.search.edit_official") : t("admin.officials.search.make_official"), edit_admin_official_path(user), class: "button radius tiny right" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<h1><%= t("admin.settings.index.title") %></h1>
|
||||
<h2><%= t("admin.settings.index.title") %></h2>
|
||||
|
||||
<ul>
|
||||
<ul class="admin-list">
|
||||
<% @settings.each do |setting| %>
|
||||
<li>
|
||||
<strong><%= setting.key.classify %></strong>
|
||||
|
||||
<%= form_for(setting, url: admin_setting_path(setting), html: { id: "edit_#{dom_id(setting)}"}) do |f| %>
|
||||
<%= f.text_field :value, label: false, id: dom_id(setting) %>
|
||||
<%= f.submit(class: "button radius tiny") %>
|
||||
<%= f.submit(class: "button radius tiny success") %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.submit(class: "button radius create") %>
|
||||
<%= f.submit(class: "button radius success") %>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<% end %>
|
||||
|
||||
<%= f.submit(class: "button radius tiny success") %>
|
||||
<br>
|
||||
|
||||
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "delete" %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
<h1>Stats</h1>
|
||||
<div class="stats row-full">
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<h2>Stats</h2>
|
||||
|
||||
<h3>Visits</h3>
|
||||
<%= visits_chart_tag id: "visits" %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<h3>Visits</h3>
|
||||
<%= visits_chart_tag id: "visits" %>
|
||||
</div>
|
||||
|
||||
<h3>Combined</h3>
|
||||
<%= events_chart_tag @event_types, id: 'combined' %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<h3>Combined</h3>
|
||||
<%= events_chart_tag @event_types, id: 'combined' %>
|
||||
</div>
|
||||
|
||||
|
||||
<% @event_types.each do |event_type| %>
|
||||
<h3><%= event_type.titleize %></h3>
|
||||
<%= events_chart_tag event_type %>
|
||||
<% end %>
|
||||
<div class="small-12">
|
||||
<% @event_types.each do |event_type| %>
|
||||
<h3><%= event_type.titleize %></h3>
|
||||
<%= events_chart_tag event_type %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ en:
|
||||
edit:
|
||||
title: 'Officials: edit user'
|
||||
destroy: "Remove 'Official' condition"
|
||||
cancel: "Cancel"
|
||||
back: Back
|
||||
flash:
|
||||
official_updated: 'Official position saved!'
|
||||
official_destroyed: 'User is not an official anymore'
|
||||
|
||||
@@ -58,7 +58,7 @@ es:
|
||||
edit:
|
||||
title: 'Cargos Públicos: Editar usuario'
|
||||
destroy: "Eliminar condición de 'Cargo Público'"
|
||||
cancel: "Cancelar"
|
||||
back: Volver
|
||||
flash:
|
||||
official_updated: 'Datos del cargo público guardados'
|
||||
official_destroyed: 'Datos guardados: el usuario ya no es cargo público'
|
||||
|
||||
Reference in New Issue
Block a user