Skip to content
Snippets Groups Projects
Commit c143e08d authored by Arnaud Levy's avatar Arnaud Levy
Browse files

wip #494

parent 893789ab
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,12 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro
breadcrumb
end
def static
@about = @person
@website = @person.websites&.first
render layout: false
end
def new
breadcrumb
end
......
......@@ -23,6 +23,10 @@
<% content_for :action_bar_left do %>
<%= destroy_link @person %>
<%= link_to t('static'),
static_admin_university_person_path(@person),
target: :_blank,
class: button_classes('btn-light') if current_user.server_admin? %>
<% end %>
<% content_for :action_bar_right do %>
......
......@@ -2,11 +2,16 @@
title: >
<%= @about.to_s %>
slug: "<%= @about.slug %>"
first_name: "<%= @about.first_name %>"
last_name: "<%= @about.last_name %>"
phone: "<%= @about.phone_mobile %>"
email: "<%= @about.email %>"
twitter: "<%= @about.twitter %>"
first_name: >
<%= @about.first_name %>
last_name: >
<%= @about.last_name %>
phone: >
<%= @about.phone_mobile %>
email: >
<%= @about.email %>
twitter: >
<%= @about.twitter %>
linkedin: >-
<%= @about.linkedin %>
website: >-
......@@ -31,5 +36,18 @@ roles:
<% if @about.administrator.for_website?(@website) %>
- administrator
<% end %>
<% if @about.roles_as_administrator.any? %>
involvements_as_administrator:
<% @about.roles_as_administrator.each do |role|
target = role.target %>
- title: >
<%= role.to_s %>
target:
title: >
<%= target.to_s %>
path: >
<%= target.path_in_website(@website) if target.respond_to? :path_in_website %>
<% end %>
<% end %>
---
<%= prepare_html_for_static @about.biography, @about.university %>
......@@ -19,5 +19,10 @@ namespace :university do
patch 'experiences' => 'alumni/experiences#update'
end
end
resources :people, :organizations
resources :people do
member do
get :static
end
end
resources :organizations
end
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