Merge pull request #1505 from consul/design

Design
This commit is contained in:
Juanjo Bazán
2017-04-28 13:34:25 +02:00
committed by GitHub
11 changed files with 77 additions and 63 deletions

View File

@@ -497,18 +497,21 @@ table.investment-projects-summary {
}
}
.geozone {
background: #ececec;
border-radius: rem-calc(6);
color: $text;
display: inline-block;
font-size: $small-font-size;
margin-bottom: $line-height/3;
padding: $line-height/4 $line-height/3;
text-decoration: none;
body.admin {
&:hover {
background: #e0e0e0;
.geozone {
background: #ececec;
border-radius: rem-calc(6);
color: $text;
display: inline-block;
font-size: $small-font-size;
margin-bottom: $line-height/3;
padding: $line-height/4 $line-height/3;
text-decoration: none;
&:hover {
background: #e0e0e0;
}
}
}

View File

@@ -1371,6 +1371,13 @@ table {
}
}
@include breakpoint(medium) {
.button.button-telegram, .ssb-telegram {
display: none !important;
}
}
.social {
a {
@@ -1471,7 +1478,7 @@ table {
width: $line-height*2;
&:before {
content: "A";
content: "1";
font-family: "icons" !important;
font-size: rem-calc(24);
left: 50%;

View File

@@ -1,7 +1,7 @@
module BannersHelper
def has_banners
@banners.count > 0
def has_banners?
@banners.present? && @banners.count > 0
end
end

View File

@@ -1,10 +1,7 @@
<div class="banner-edit row">
<div class="small-12 column">
<%= link_to admin_banners_path, class: "back" do %>
<span class="icon-angle-left"></span>
<%= t("admin.banners.edit.back") %>
<% end %>
<%= back_link_to admin_banners_path %>
<h1><%= t("admin.banners.edit.editing") %></h1>

View File

@@ -7,36 +7,48 @@
<h3><%= page_entries_info @banners %></h3>
<table>
<% @banners.each do |banner| %>
<tr id="<%= dom_id(banner) %>">
<td class="small-12 medium-9">
<small>
<%= t("admin.banners.banner.post_started_at")%> <strong><%= banner.post_started_at %></strong>
&nbsp;|&nbsp;
<%= t("admin.banners.banner.post_ended_at")%> <strong><%= banner.post_ended_at%></strong>
</small>
<div class="<%= banner.style %>">
<div class="<%= banner.image %>">
<%= link_to banner.target_url do %>
<h2><%= banner.title %></h2>
<h3><%= banner.description %></h3>
<% end %>
<% @banners.each do |banner| %>
<table>
<thead>
<tr id="<%= dom_id(banner) %>">
<th scope="col"><%= t("admin.banners.banner.post_started_at")%></th>
<th scope="col"><%= t("admin.banners.banner.post_ended_at")%></th>
<th scope="col" class="text-center"><%= t("admin.actions.actions")%></th>
</tr>
</thead>
<tbody>
<tr>
<td><%= banner.post_started_at %></td>
<td><%= banner.post_ended_at %></td>
<td class="text-right">
<div class="small-12 medium-6 column">
<%= link_to t("admin.banners.index.edit"), edit_admin_banner_path(banner),
class: 'button hollow expanded' %>
</div>
</div>
</td>
<td class="text-right">
<%= link_to t("admin.banners.index.edit"), edit_admin_banner_path(banner),
class: 'edit-banner button hollow' %>
<%= link_to t("admin.banners.index.delete"), admin_banner_path(banner),
method: :delete,
class: 'button hollow alert' %>
</td>
</tr>
<% end %>
</table>
<div class="small-12 medium-6 column">
<%= link_to t("admin.banners.index.delete"), admin_banner_path(banner),
method: :delete,
class: 'button hollow alert expanded' %>
</div>
</td>
</tr>
<tr>
<th colspan="3" scope="col" class="text-center"><%= t("admin.banners.index.preview") %></th>
</tr>
<tr>
<td colspan="3">
<div class="<%= banner.style %>">
<div class="<%= banner.image %>">
<%= link_to banner.target_url do %>
<h2><%= banner.title %></h2>
<h3><%= banner.description %></h3>
<% end %>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<% end %>
<%= paginate @banners %>

View File

@@ -1,10 +1,7 @@
<div class="banner-new row">
<div class="small-12 column">
<%= link_to admin_banners_path, class: "back" do %>
<span class="icon-angle-left"></span>
<%= t("admin.banners.new.back") %>
<% end %>
<%= back_link_to admin_banners_path %>
<h1><%= t("admin.banners.new.creating") %></h1>

View File

@@ -27,7 +27,7 @@
<% end %>
</div>
<% if has_banners %>
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>

View File

@@ -29,7 +29,7 @@
<% end %>
</div>
<% if has_banners %>
<% if has_banners? %>
<%= render "shared/banner" %>
<% end %>

View File

@@ -1,9 +1,9 @@
<% banner = @banners.sample%>
<% banner = @banners.sample %>
<div class="<%= banner.style %>">
<div class="<%= banner.image %>">
<%= link_to banner.target_url do %>
<h2><%=banner.title%></h2>
<h3><%=banner.description%></h3>
<h2><%=banner.title %></h2>
<h3><%=banner.description %></h3>
<% end %>
</div>
</div>

View File

@@ -24,6 +24,7 @@ en:
all: All
with_active: Active
with_inactive: Inactive
preview: Preview
banner:
title: Title
description: Description
@@ -33,7 +34,6 @@ en:
post_started_at: Post started at
post_ended_at: Post ended at
edit:
back: Back
editing: Edit banner
form:
submit_button: Save changes
@@ -43,7 +43,6 @@ en:
one: "prevented this banner from being saved"
other: 'prevented this banner from being saved'
new:
back: Back
creating: Create banner
activity:
show:

View File

@@ -24,6 +24,7 @@ es:
all: Todos
with_active: Activos
with_inactive: Inactivos
preview: Vista previa
banner:
title: Título
description: Descripción
@@ -33,7 +34,6 @@ es:
post_started_at: Inicio de publicación
post_ended_at: Fin de publicación
edit:
back: Volver
editing: Editar el banner
form:
submit_button: Guardar Cambios
@@ -43,7 +43,6 @@ es:
one: "error impidió guardar el banner"
other: "errores impidieron guardar el banner."
new:
back: Volver
creating: Crear banner
activity:
show: