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

fix

parent f09ada93
No related branches found
No related tags found
No related merge requests found
......@@ -14,8 +14,12 @@ class Admin::Education::DiplomasController < Admin::Education::ApplicationContro
def static
@about = @diploma
@website = @diploma.websites&.first
@programs = @website.education_programs.root.ordered
render layout: false
if @website.nil?
redirect_to [:admin, @diploma]
else
@programs = @website.education_programs.root.ordered
render layout: false
end
end
def new
......
......@@ -3,29 +3,24 @@
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="row">
<div class="col-lg-8">
<div class="card flex-fill w-100">
<div class="card-header">
<h5 class="card-title mb-0"><%= t('metadata') %></h5>
</div>
<div class="card-body">
<%= f.input :name %>
<div class="row">
<div class="col-lg-6">
<%= f.input :short_name %>
</div>
<div class="col-lg-6">
<%= f.input :level, include_blank: false %>
</div>
<div class="col-lg-6">
<%= f.input :ects %>
</div>
<div class="col-lg-6">
<%= f.input :duration, as: :string %>
</div>
<%= osuny_panel t('metadata') do %>
<%= f.input :name %>
<div class="row">
<div class="col-lg-6">
<%= f.input :short_name %>
</div>
<div class="col-lg-6">
<%= f.input :level, include_blank: false %>
</div>
<div class="col-lg-6">
<%= f.input :ects %>
</div>
<div class="col-lg-6">
<%= f.input :duration, as: :string %>
</div>
<%= render 'admin/application/summary/form', f: f, about: diploma %>
</div>
</div>
<%= render 'admin/application/summary/form', f: f, about: diploma %>
<% end %>
</div>
</div>
<% content_for :action_bar_right do %>
......
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