Merge pull request #5279 from jensconsul/admin_panel_branch

Add information about the project to admin index
This commit is contained in:
Javi Martín
2023-10-24 15:23:33 +02:00
committed by GitHub
9 changed files with 87 additions and 10 deletions

View File

@@ -38,10 +38,6 @@ $table-header: #ecf1f6;
small {
color: $text-medium;
}
&.title {
text-transform: uppercase;
}
}
h3 {

View File

@@ -0,0 +1,31 @@
.admin-dashboard-index {
> header h2 {
text-transform: uppercase;
border-bottom: 1px solid $border;
}
address {
> :not(:last-child) {
&::after {
content: "";
display: block;
margin-bottom: $line-height / 3;
}
}
a {
&[href^="mailto:"] {
@include has-fa-icon(envelope, regular);
}
&[href^="http"] {
@include has-fa-icon(globe, solid);
}
&::before {
margin-#{$global-right}: 0.2em;
transform: translateY(-0.2em);
}
}
}
}

View File

@@ -0,0 +1,11 @@
<% provide :main_class, "admin-dashboard-index" %>
<%= header(skip_section_title: true) %>
<p><%= t("admin.dashboard.index.description", org: setting["org_name"]) %></p>
<%= info %>
<address>
<%= email_link %>
<%= website_link %>
</address>

View File

@@ -0,0 +1,21 @@
class Admin::Dashboard::IndexComponent < ApplicationComponent
include Header
def title
t("admin.dashboard.index.title")
end
private
def info
sanitize t("admin.dashboard.index.info")
end
def email_link
mail_to "info@consulfoundation.org"
end
def website_link
link_to "https://consuldemocracy.org", "https://consuldemocracy.org"
end
end

View File

@@ -1,10 +1,10 @@
module Header
extend ActiveSupport::Concern
def header(before: nil, &block)
def header(before: nil, skip_section_title: false, &block)
provide(:title) do
[
t("#{namespace}.header.title", default: ""),
(t("#{namespace}.header.title", default: "") unless skip_section_title),
strip_tags(title),
setting["org_name"]
].reject(&:blank?).join(" - ")

View File

@@ -1,3 +1 @@
<h2 class="title inline-block"><%= t("admin.dashboard.index.title") %></h2>
<p><%= t("admin.dashboard.index.description", org: setting["org_name"]) %></p>
<%= render Admin::Dashboard::IndexComponent.new %>

View File

@@ -21,7 +21,7 @@
<% end %>
</nav>
<div class="admin-content">
<div class="admin-content <%= yield(:main_class) %>">
<%= label_tag :show_menu, t("admin.menu.admin"),
"aria-hidden": true, class: "button hollow expanded" %>

View File

@@ -451,6 +451,16 @@ en:
back: Go back to %{org}
title: Administration
description: Welcome to the %{org} admin panel.
info: |-
<p>This is the place where you, as an administrator, implement and oversee the citizen participation process in your city or region.</p>
<p>You are now one of hundreds of governments and municipalities worldwide that are using the CONSUL DEMOCRACY platform to put citizen participation into practice. Congratulations!</p>
<p>The CONSUL DEMOCRACY Foundation is at the heart of the global user community. We'd like to ask you to get in touch so we get a grasp of who's using the software and see how we might assist with implementation or use. We can't wait to welcome you to the community.</p>
<p>Happy administrating!</p>
<p>Greetings from the CONSUL DEMOCRACY Foundation team.</p>
actions:
index:
description: "When users create proposals they can access a dashboard of their proposal, where you can propose resources and recommendations to get support for their idea."

View File

@@ -451,6 +451,16 @@ es:
back: Volver a %{org}
title: Administración
description: Bienvenido al panel de administración de %{org}.
info: |-
<p>Este es el lugar donde tú, como administrador, implementas y supervisas el proceso de participación ciudadana en tu ciudad o región.</p>
<p>Ahora eres uno de los cientos de gobiernos y municipios de todo el mundo que están utilizando la plataforma CONSUL DEMOCRACY para poner en práctica la participación ciudadana. ¡Enhorabuena!</p>
<p>La Fundación CONSUL DEMOCRACY está en el centro de la comunidad mundial de usuarios. Nos gustaría pedirte que te pongas en contacto con nosotros para saber quién utiliza el software y ver cómo podemos ayudar en su implantación o uso. Estamos deseando darte la bienvenida a la comunidad.</p>
<p>¡Feliz administración!</p>
<p>Saludos del equipo de la Fundación CONSUL DEMOCRACY.</p>
actions:
index:
description: "Cuando los usuarios crean propuestas pueden acceder a un panel de progreso de su propuesta, donde se le puede proponer recursos y recomendaciones para conseguir apoyos a su idea."