diff --git a/app/assets/stylesheets/extranet/pages/_experience.sass b/app/assets/stylesheets/extranet/pages/_experience.sass deleted file mode 100644 index b2d81235231fc33a0b2baf8bd9b4bbacbc731e71..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/extranet/pages/_experience.sass +++ /dev/null @@ -1,4 +0,0 @@ -.experience - &__company - &__logo - max-width: 100px \ No newline at end of file diff --git a/app/assets/stylesheets/extranet/pages/_experiences.sass b/app/assets/stylesheets/extranet/pages/_experiences.sass new file mode 100644 index 0000000000000000000000000000000000000000..44f23b193a8442f5e530f8ffb2d6b0fe351afc0b --- /dev/null +++ b/app/assets/stylesheets/extranet/pages/_experiences.sass @@ -0,0 +1,3 @@ +.experiences + &__experience + @include pseudo-bottom-border \ No newline at end of file diff --git a/app/assets/stylesheets/extranet/pages/_organization.sass b/app/assets/stylesheets/extranet/pages/_organization.sass index d245d35372f9d1a2a2ec4e8052b1a7cd76fbe4cd..29662cfd7bc994fabb8f98c36858407662eba5a6 100644 --- a/app/assets/stylesheets/extranet/pages/_organization.sass +++ b/app/assets/stylesheets/extranet/pages/_organization.sass @@ -19,23 +19,3 @@ align-items: center display: flex justify-content: space-between - -.organizations-show - .experiences - margin-top: px2rem(80) - ul - padding-left: 0 - li - @include make-row - display: flex - position: relative - > div - @include make-col-ready - &:nth-child(1) - width: percentage(2/9) - &:nth-child(2) - @include pseudo-bottom-border - @include pseudo-top-border - padding-top: px2rem(20) - width: percentage(7/9) - diff --git a/app/assets/stylesheets/extranet/pages/_person.sass b/app/assets/stylesheets/extranet/pages/_person.sass index bca155082899972a45161a59748f69add6b49997..0656f586e494fc0eb75518d1bf2470759232197b 100644 --- a/app/assets/stylesheets/extranet/pages/_person.sass +++ b/app/assets/stylesheets/extranet/pages/_person.sass @@ -5,49 +5,3 @@ &__portrait margin-top: -200px margin-bottom: 50px - -.persons-show, -.account-show - .top - h1 - font-weight: normal - @include media-breakpoint-down(md) - header - border-bottom: 0 - .experiences - margin-top: px2rem(70) - ul - padding-left: 0 - li - @include make-row - @include pseudo-top-border - display: flex - padding: px2rem(16) 0 - position: relative - p - margin-bottom: px2rem(8) - > div - @include make-col-ready - padding-bottom: px2rem(10) - padding-top: px2rem(10) - &:nth-child(3) - align-self: center - padding-bottom: 0 - padding-top: 0 - text-align: right - @include media-breakpoint-up(md) - &:nth-child(1) - width: percentage(4/9) - &:nth-child(2) - width: percentage(2/9) - &:nth-child(3) - width: percentage(3/9) - @include media-breakpoint-down(md) - &:nth-child(2) - width: 50% - &:nth-child(3) - width: 50% - &:last-child - @include pseudo-bottom-border - img - max-height: 80px \ No newline at end of file diff --git a/app/views/extranet/account/show.html.erb b/app/views/extranet/account/show.html.erb index 300e2ed2c2a858910f1deb6584bdc0c8a05cd042..e13e2c8a7efa35bef57dfaba8ea4840f39d57b53 100644 --- a/app/views/extranet/account/show.html.erb +++ b/app/views/extranet/account/show.html.erb @@ -2,28 +2,18 @@ <div class="row"> <div class="col-md-9"> - <div class="biography"> + <div class="biography mb-5"> <p><%= @person&.biography %></p> </div> - <div class="experiences"> - <%= link_to University::Person::Experience.human_attribute_name('new'), - new_experience_path, - class: 'btn btn-sm btn-secondary float-end mb-4' %> - <p class="mb-4"><%= t('extranet.experiences.title') %></p> - <br> - <% if @person&.experiences.any? %> - <ul> - <% @person.experiences.ordered.each do |experience| %> - <%= render 'extranet/experiences/experience', experience: experience, edit: true %> - <% end %> - </ul> - <% end %> - </div> + <%= link_to University::Person::Experience.human_attribute_name('new'), + new_experience_path, + class: 'btn btn-sm btn-secondary float-end' %> + <p><%= t('extranet.experiences.title') %></p> + <%= render 'extranet/experiences/list', person: @person, edit: true %> </div> <div class="col-md-3"> <%= kamifusen_tag @person.best_picture, width: 400, class: 'img-fluid person__portrait' if @person&.best_picture.attached? %> - <div class="mb-4"> <%= link_to t('extranet.account.edit'), edit_account_path, class: 'btn btn-primary mb-2' %> <%= link_to t('extranet.account.edit_personal_data'), edit_personal_data_path, class: 'btn btn-primary' %> diff --git a/app/views/extranet/experiences/_experience.html.erb b/app/views/extranet/experiences/_experience.html.erb index a51fc5b7bfc5b100915adf3fb103c3af8e18538d..92ffc5d8d2ac2947692d0b64d498fff54049c4e1 100644 --- a/app/views/extranet/experiences/_experience.html.erb +++ b/app/views/extranet/experiences/_experience.html.erb @@ -1,32 +1,31 @@ <% edit ||= false %> -<li> - <div> +<li class="experiences__experience row py-3"> + <div class="col-md-4"> <p><b><%= experience.description %></b></p> <p class="mb-0"> <%= "#{experience.from_year} —" if experience.from_year %> <%= experience.to_year || t('today') %> </p> + + <%= link_to University::Person::Experience.human_attribute_name('edit'), + edit_experience_path(experience), + class: 'btn btn-sm btn-secondary mt-2' if edit %> </div> - <div> - <% if experience.organization.present? %> + <% if experience.organization.present? %> + <div class="col-md-6"> <p><%= link_to experience.organization, experience.organization %></p> <% if experience.organization.url %> <p class="mb-0"><small><%= link_to experience.organization.url, experience.organization.url %></small></p> <% end %> - <% end %> - </div> - <div class="experience__company"> - <% if experience.organization.present? %> + </div> + <div class="col-md-2"> <% if experience.organization.logo.attached? %> - <%= link_to experience.organization do %> - <%= kamifusen_tag experience.organization.logo, height: 80, class: 'img-fluid experience__company__logo' %> - <% end %> + <%= link_to experience.organization do %> + <%= kamifusen_tag experience.organization.logo, height: 80, class: 'img-fluid' %> + <% end %> <% end %> - <% end %> - </div> - <%= link_to University::Person::Experience.human_attribute_name('edit'), - edit_experience_path(experience), - class: 'btn btn-sm btn-secondary float-end mt-2' if edit %> + <div> + <% end %> </li> diff --git a/app/views/extranet/experiences/_list.html.erb b/app/views/extranet/experiences/_list.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..ae422741e753820cedfee5d7b1e20ea6ae681e6e --- /dev/null +++ b/app/views/extranet/experiences/_list.html.erb @@ -0,0 +1,12 @@ +<% +edit ||= false +%> +<% if person&.experiences.any? %> + <div class="experiences mt-4"> + <ul class="list-unstyled"> + <% @person.experiences.ordered.each do |experience| %> + <%= render 'extranet/experiences/experience', experience: experience, edit: edit %> + <% end %> + </ul> + </div> +<% end %> \ No newline at end of file diff --git a/app/views/extranet/organizations/show.html.erb b/app/views/extranet/organizations/show.html.erb index 5a7bda81280fd78d42a715e34740f610725e7537..e7fa87f238295a5d0bbb543017a85a9d38a812a2 100644 --- a/app/views/extranet/organizations/show.html.erb +++ b/app/views/extranet/organizations/show.html.erb @@ -2,16 +2,16 @@ <div class="row"> <div class="col-md-9"> - <div class="biography"> + <div class="biography mb-5"> <p><%= @organization.text %></p> </div> <div class="experiences"> <p class="mb-4"><%= t('extranet.organization.experiences', count: @organization.experiences.count) %></p> - <ul> + <ul class="list-unstyled"> <% @organization.experiences.ordered.each do |experience| %> <li class="mb-3"> <div> - <%= link_to experience.person, class: "stretched-link" do %> + <%= link_to experience.person do %> <% if experience.person.picture.attached? %> <%= kamifusen_tag experience.person.picture, width: 200, class: 'img-fluid' %> <% else %> diff --git a/app/views/extranet/personal_data/edit.html.erb b/app/views/extranet/personal_data/edit.html.erb index cd5d4cdcd0ce15d448f8f04b39400932bb185a2f..2188965b6f8f5ac228000c9054640f979651e3a9 100644 --- a/app/views/extranet/personal_data/edit.html.erb +++ b/app/views/extranet/personal_data/edit.html.erb @@ -4,53 +4,58 @@ <%= f.error_notification %> <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> - <h5><%= University::Person.human_attribute_name('essentials') %></h5> + <h2 class="h5 mt-5"> + <%= University::Person.human_attribute_name('essentials') %> + </h2> <div class="row"> - <div class="col-md-6"> + <div class="col-md-4"> <%= f.input :gender, label_method: lambda { |g| t("activerecord.attributes.university/person.genders.#{g[1]}") } %> - </div> - <div class="col-md-6"> <%= f.input :birthdate, discard_year: true, include_blank: true %> </div> + <div class="col-md-8"> + <%= f.input :biography, as: :summernote %> + </div> </div> - <%= f.input :description_short %> - <%= f.input :biography, as: :summernote %> - <h5><%= University::Person.human_attribute_name('contacts') %></h5> + <h2 class="h5 mt-5"> + <%= University::Person.human_attribute_name('contacts') %> + </h2> <div class="row"> <div class="col-md-4"> <%= f.input :phone_mobile %> - </div> - <div class="col-md-4"> <%= f.input :phone_professional %> - </div> - <div class="col-md-4"> <%= f.input :phone_personal %> </div> - </div> - <div class="row"> - <div class="col-md-6"> + <div class="col-md-8"> <%= f.input :address %> - </div> - <div class="col-md-6"> - <%= f.input :zipcode %> + <div class="row"> + <div class="col-md-4"> + <%= f.input :zipcode %> + </div> + <div class="col-md-8"> + <%= f.input :city %> + </div> + </div> + <%= f.input :country, input_html: { class: 'form-select' } %> </div> </div> <div class="row"> <div class="col-md-6"> - <%= f.input :city %> - </div> - <div class="col-md-6"> - <%= f.input :country, input_html: { class: 'form-select' } %> </div> </div> + <div class="row"> + </div> - <h5><%= University::Person.human_attribute_name('socials') %></h5> + <h2 class="h5 mt-5"> + <%= University::Person.human_attribute_name('socials') %> + </h2> - <%= f.input :url %> <div class="row"> + <div class="col-md-6"> + <%= f.input :url %> + </div> <div class="col-md-6"> <%= f.input :linkedin %> </div> diff --git a/app/views/extranet/persons/show.html.erb b/app/views/extranet/persons/show.html.erb index f9ef0205f03689363e5cc5df0ce4df886b9f23be..6608ebc0a104df87faef648ada56417573346cb4 100644 --- a/app/views/extranet/persons/show.html.erb +++ b/app/views/extranet/persons/show.html.erb @@ -5,16 +5,10 @@ <div class="biography"> <p><%= @person&.biography %></p> </div> - <% if @person&.experiences.any? %> - <div class="experiences"> - <p class="mb-4"><%= t('extranet.experiences.title') %></p> - <ul> - <% @person.experiences.ordered.each do |experience| %> - <%= render 'extranet/experiences/experience', experience: experience %> - <% end %> - </ul> - </div> - <% end %> + + <p class="mb-4"><%= t('extranet.experiences.title') %></p> + <%= render 'extranet/experiences/list', person: @person %> + </div> <div class="col-md-3"> <%= kamifusen_tag @person.best_picture, width: 400, class: 'img-fluid person__portrait' if @person.best_picture.attached? %> diff --git a/config/locales/extranet/en.yml b/config/locales/extranet/en.yml index 2e24e05fcb9bc22c6f56e8344a5d6f33fe7a531c..e7aa2085e8ce6b895865ec33b7a11097940bf6fd 100644 --- a/config/locales/extranet/en.yml +++ b/config/locales/extranet/en.yml @@ -2,8 +2,8 @@ en: extranet: account: my: My account - edit: Edit - edit_personal_data: Edit my personal data + edit: Edit account + edit_personal_data: Edit profile updated: Updated logout: Log out errors: diff --git a/config/locales/extranet/fr.yml b/config/locales/extranet/fr.yml index 8ea70d0aef54e1956611b8e6e5d2b8effe1f4932..7f459d9c77b956164596c9a4b6748e0ba7be2ff1 100644 --- a/config/locales/extranet/fr.yml +++ b/config/locales/extranet/fr.yml @@ -2,8 +2,8 @@ fr: extranet: account: my: Mon compte - edit: Modifier - edit_personal_data: Modifier mes données personnelles + edit: Modifier mon compte + edit_personal_data: Modifier mon profil updated: Mise à jour effectuée logout: Déconnexion errors: