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