Skip to content

Commit

Permalink
Intègre le nouveau design de la page gestion de mon compte
Browse files Browse the repository at this point in the history
  • Loading branch information
mdomine authored and etienneCharignon committed Feb 2, 2021
1 parent bb955d6 commit 357d700
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/admin/comptes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ def update_resource(object, attributes)
object.send(update_method, *attributes)
end
end

show do
render 'show'
end
end
Binary file added app/assets/images/avatar_salut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/stylesheets/active_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
@import 'admin/pages/aide/contact';
@import 'admin/pages/aide/menu';
@import 'admin/pages/contacts';
@import 'admin/comptes';

// Overriding any non-variable SASS must be done after the fact.
// For example, to change the default status-tag color:
Expand Down
54 changes: 54 additions & 0 deletions app/assets/stylesheets/admin/_comptes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.mon-compte {
$grid-columns: 8;
$grid-gutter-width: 0;
@import "../bootstrap_minimal";

.titre {
@include titre;
font-size: 1.5rem;
margin-bottom: 1.5rem;
}
.introduction {
@include carte;
margin-bottom: 1.25rem;
padding: 1rem 1.5rem 2.8rem;
p {
font-size: 0.875rem;
color: $couleur-texte-sombre;
a {
text-decoration: underline;
color: $eva_main_blue;
}
}
img {
width: 268px;
height: 256px;
position: absolute;
right: 0;
bottom: 0;
}
}

.panel {
padding: 1.5rem;
.compte {
padding: 0;
}
}

table {
margin-bottom: 0;
.row {
display: table-row;
th, td {
font-size: 0.875rem;
border: 0;
color: $couleur-texte-sombre;
}
th {
font-weight: normal;
text-transform: none;
}
}
}
}
27 changes: 27 additions & 0 deletions app/views/admin/comptes/_show.html.arb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

div class: 'mon-compte row' do
div class: 'offset-1 col-4' do
h1 t('.titre'), class: 'titre'

div class: 'introduction' do
div class: 'introduction__texte' do
md t('.introduction', lien_aide: admin_aide_path)
end
text_node image_tag 'avatar_salut.png'
end

div class: 'panel' do
attributes_table_for compte do
row :email
row :created_at
end
end

div class: 'panel' do
attributes_table_for compte do
row :structure
end
end
end
end
11 changes: 11 additions & 0 deletions config/locales/views/comptes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fr:
admin:
comptes:
show:
titre: 'Bonjour,'
introduction: |
Ici vous pouvez gérer votre compte et
vos informations personnelles.
Si vous avez besoin d’aide,
rendez-vous [ici](%{lien_aide})

0 comments on commit 357d700

Please sign in to comment.