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

Fix #483

parent a101d8f9
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,12 @@ class Admin::Education::DiplomasController < Admin::Education::ApplicationContro ...@@ -11,6 +11,12 @@ class Admin::Education::DiplomasController < Admin::Education::ApplicationContro
breadcrumb breadcrumb
end end
def static
@about = @diploma
@website = @diploma.websites&.first
render layout: false
end
def new def new
breadcrumb breadcrumb
end end
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# #
class Education::Diploma < ApplicationRecord class Education::Diploma < ApplicationRecord
include WithUniversity include WithUniversity
include WithBlocks
include WithGit include WithGit
include WithSlug include WithSlug
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<div class="row"> <div class="row">
<div class="col-lg-8"> <div class="col-lg-8">
<%= render 'admin/communication/blocks/list', about: @diploma %>
<div class="card flex-fill w-100"> <div class="card flex-fill w-100">
<div class="card-header"> <div class="card-header">
<h2 class="card-title mb-0 h5"> <h2 class="card-title mb-0 h5">
...@@ -11,6 +12,7 @@ ...@@ -11,6 +12,7 @@
<%= render 'admin/education/programs/list', <%= render 'admin/education/programs/list',
programs: @programs, programs: @programs,
hide_diploma: true %> hide_diploma: true %>
</div> </div>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
...@@ -37,6 +39,9 @@ ...@@ -37,6 +39,9 @@
<% content_for :action_bar_left do %> <% content_for :action_bar_left do %>
<%= destroy_link @diploma %> <%= destroy_link @diploma %>
<%= link_to t('static'),
static_admin_education_diploma_path(@diploma),
class: button_classes('btn-light') if current_user.server_admin? %>
<% end %> <% end %>
<% content_for :action_bar_right do %> <% content_for :action_bar_right do %>
......
...@@ -8,4 +8,5 @@ level: <%= @about.level_i18n %> ...@@ -8,4 +8,5 @@ level: <%= @about.level_i18n %>
ects: <%= @about.ects %> ects: <%= @about.ects %>
duration: > duration: >
<%= prepare_text_for_static @about.duration %> <%= prepare_text_for_static @about.duration %>
<%= render 'admin/communication/blocks/static', about: @about %>
--- ---
...@@ -36,5 +36,9 @@ namespace :education do ...@@ -36,5 +36,9 @@ namespace :education do
end end
resources :academic_years resources :academic_years
resources :cohorts, only: [:index, :show] resources :cohorts, only: [:index, :show]
resources :diplomas resources :diplomas 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