Skip to content
Snippets Groups Projects
Unverified Commit bd23f060 authored by Pierre-André Boissinot's avatar Pierre-André Boissinot Committed by GitHub
Browse files

Merge pull request #608 from noesya/extranet_hint_for_organization

Aide sur le champ d'organisation à la création d'une expérience pro dans un extranet
parents b9a4e0f6 ce59f4b7
No related branches found
No related tags found
No related merge requests found
......@@ -59,9 +59,9 @@ class Communication::Extranet < ApplicationRecord
def should_show_years?
# For a single program, year is like cohort
return false if about.is_a? Education::Program
return false if about.nil? || about&.is_a? Education::Program
# if a school has a single program, same thing
about.programs.many?
about&.programs&.many?
end
def alumni
......
......@@ -11,6 +11,11 @@ module University::WithPeopleAndOrganizations
class_name: 'University::Organization',
dependent: :destroy
alias_attribute :organizations, :university_organizations
has_many :person_experiences,
class_name: 'University::Person::Experience',
dependent: :destroy
alias_attribute :university_person_experiences, :person_experiences
end
end
......@@ -12,11 +12,11 @@
<%= render 'extranet/persons/path', 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? %>
<%= 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 mb-2' %>
</div>
<%= render 'extranet/persons/details', person: @person unless @person.nil? %>
</div>
</div>
\ No newline at end of file
</div>
......@@ -3,12 +3,12 @@ edit ||= false
%>
<div class="experiences mt-4">
<ul class="list-unstyled">
<% if person&.experiences.any? %>
<% if person&.experiences&.any? %>
<% @person.experiences.ordered.each do |experience| %>
<%= render 'extranet/experiences/experience', experience: experience, edit: edit %>
<% end %>
<% end %>
<% person&.cohorts.each do |cohort| %>
<% person&.cohorts&.each do |cohort| %>
<li class="experiences__experience py-4 border-top">
<div class="row">
<div class="col-md-6">
......@@ -31,4 +31,4 @@ edit ||= false
</li>
<% end %>
</ul>
</div>
\ No newline at end of file
</div>
......@@ -150,7 +150,7 @@ en:
tenure: "To differ from temporary lecturer."
twitter: "Example: osuny"
university_person_experience:
organization: "Choose the organization if it exists, otherwise create it with the button below"
organization_name: "Choose the organization if it exists, by searching with name or SIREN code.<br>Otherwise create it by entering it's name."
description: "Ex: Project manager, Communication assistant, Journalist..."
from_year: "In charge since..."
to_year: "Leave blank if you are still in charge"
......
......@@ -150,7 +150,7 @@ fr:
tenure: "À différencier d'une personne vacataire."
twitter: "Exemple : osuny"
university_person_experience:
organization: "Choisissez l'organisation si elle existe. Si elle n'existe pas encore, créez-là ci-dessous."
organization_name: "Choisissez l'organisation si elle existe, en la cherchant par nom ou SIREN.<br>Si elle n'existe pas encore, créez-là en entrant simplement son nom."
description: "Ex: Chargée de projet, Assistant communication, Journaliste..."
from_year: "En poste depuis..."
to_year: "Si vous êtes toujours à ce poste, laissez vide"
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment