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

Fix #502

parent 3109498e
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,12 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio ...@@ -15,6 +15,12 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio
breadcrumb breadcrumb
end end
def static
@about = @organization
@website = @organization.websites&.first
render layout: false
end
def new def new
breadcrumb breadcrumb
end end
......
...@@ -36,6 +36,7 @@ class University::Organization < ApplicationRecord ...@@ -36,6 +36,7 @@ class University::Organization < ApplicationRecord
include WithBlobs include WithBlobs
include WithUniversity include WithUniversity
include WithSlug include WithSlug
include WithBlocks
has_many :experiences, has_many :experiences,
class_name: 'University::Person::Experience' class_name: 'University::Person::Experience'
......
...@@ -55,6 +55,7 @@ class University::Person < ApplicationRecord ...@@ -55,6 +55,7 @@ class University::Person < ApplicationRecord
include WithSlug include WithSlug
include WithPicture include WithPicture
include WithRoles include WithRoles
include WithBlocks
LIST_OF_ROLES = [ LIST_OF_ROLES = [
:administration, :administration,
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
</div> </div>
</div> </div>
</div> </div>
<%= render 'admin/communication/blocks/list', about: @organization %>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="card flex-fill w-100"> <div class="card flex-fill w-100">
...@@ -144,6 +145,10 @@ ...@@ -144,6 +145,10 @@
<% content_for :action_bar_left do %> <% content_for :action_bar_left do %>
<%= destroy_link @organization %> <%= destroy_link @organization %>
<%= link_to t('static'),
static_admin_university_organization_path(@organization),
target: :_blank,
class: button_classes('btn-light') if current_user.server_admin? %>
<% end %> <% end %>
<% content_for :action_bar_right do %> <% content_for :action_bar_right do %>
......
...@@ -18,5 +18,6 @@ logo: "<%= @about.logo.blob.id %>" ...@@ -18,5 +18,6 @@ logo: "<%= @about.logo.blob.id %>"
<% end %> <% end %>
description: > description: >
<%= prepare_text_for_static @about.description %> <%= prepare_text_for_static @about.description %>
<%= render 'admin/communication/blocks/static', about: @about %>
--- ---
<%= prepare_html_for_static @about.text, @about.university %> <%= prepare_html_for_static @about.text, @about.university %>
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
</div> </div>
</div> </div>
<% end %> <% end %>
<%= render 'admin/communication/blocks/list', about: person %>
</div> </div>
<div class="col-md-4 col-xl-3"> <div class="col-md-4 col-xl-3">
<div class="card flex-fill w-100"> <div class="card flex-fill w-100">
......
...@@ -63,5 +63,6 @@ administrative_missions: ...@@ -63,5 +63,6 @@ administrative_missions:
<%= target.path_in_website(@website) if target.respond_to? :path_in_website %> <%= target.path_in_website(@website) if target.respond_to? :path_in_website %>
<% end %> <% end %>
<% end %> <% end %>
<%= render 'admin/communication/blocks/static', about: @about %>
--- ---
<%= prepare_html_for_static @about.biography, @about.university %> <%= prepare_html_for_static @about.biography, @about.university %>
...@@ -24,5 +24,9 @@ namespace :university do ...@@ -24,5 +24,9 @@ namespace :university do
get :static get :static
end end
end end
resources :organizations resources :organizations do
member do
get :static
end
end
end 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