Skip to content
Snippets Groups Projects
Commit 3e25a927 authored by pabois's avatar pabois
Browse files

close #60

parent a0801004
No related branches found
No related tags found
No related merge requests found
<% content_for :title, @school %>
<% content_for :title_right do %>
<div class="row">
<div class="col-md-4">
<div class="card flex-fill w-100">
<div class="card-header">
<h2 class="card-title mb-0 h5"><%= t('metadata') %></h2>
</div>
<div class="card-body">
<h3 class="h5"><%= Education::School.human_attribute_name('address') %></h3>
<%= @school.address %><br>
<%= @school.zipcode %> <%= @school.city %><br>
<%= @school.country %>
<h3 class="h5 mt-4"><%= Education::School.human_attribute_name('phone') %></h3>
<%= @school.phone %>
</div>
</div>
</div>
<% if @school.programs.any? %>
<div class="col-md-4">
<div class="card flex-fill w-100">
<div class="card-header">
<h2 class="card-title mb-0 h5"><%= Education::School.human_attribute_name('programs') %></h2>
</div>
<div class="card-body">
<ul class="list-unstyled">
<% @school.programs.ordered.each do |program| %>
<li><%= link_to_if can?(:read, program), program, [:admin, program] %></li>
<% end %>
</ul>
</div>
</div>
</div>
<% end %>
<% if @school.websites.any? %>
<%= Communication::Website.model_name.human %>
<i class="fas fa-arrow-right small"></i>
<% @school.websites.each do |website| %>
<%= link_to website, [:admin, website] %><br>
<% end %>
<div class="col-md-4">
<div class="card flex-fill w-100">
<div class="card-header">
<h2 class="card-title mb-0 h5"><%= Education::School.human_attribute_name('websites') %></h2>
</div>
<div class="card-body">
<ul class="list-unstyled">
<% @school.websites.each do |website| %>
<%= link_to website, [:admin, website] %><br>
<% end %>
</ul>
</div>
</div>
</div>
<% end %>
<% end %>
<p>
<%= @school.address %><br>
<%= @school.zipcode %> <%= @school.city %><br>
<%= @school.country %>
<%= @school.phone %>
</p>
</div>
<% content_for :action_bar_right do %>
<%= edit_link @school %>
......
......@@ -5,36 +5,37 @@
<div class="col-md-8">
<div class="card flex-fill w-100">
<div class="card-header">
<h2 class="card-title mb-0 h5"><%= t('content') %></h2>
<h2 class="card-title mb-0 h5"><%= t('metadata') %></h2>
</div>
<div class="card-body">
<h3 class="h5"><%= Education::Teacher.human_attribute_name('biography') %></h3>
<%= @teacher.biography %>
<h3 class="h5 mt-4"><%= Education::Teacher.human_attribute_name('slug') %></h3>
<%= @teacher.slug %>
<% if @teacher.user %>
<h3 class="h5 mt-4"><%= Education::Teacher.human_attribute_name('user') %></h3>
<%= link_to_if can?(:read, @teacher.user), @teacher.user, admin_user_path(@teacher.user) %>
<% end %>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card flex-fill w-100">
<div class="card-header">
<h2 class="card-title mb-0 h5"><%= t('metadata') %></h2>
<% if @teacher.programs.any? %>
<div class="col-md-4">
<div class="card flex-fill w-100">
<div class="card-header">
<h2 class="card-title mb-0 h5"><%= Education::Teacher.human_attribute_name('programs') %></h2>
</div>
<div class="card-body">
<ul class="list-unstyled">
<% @teacher.programs.ordered.each do |program| %>
<li><%= link_to_if can?(:read, program), program, [:admin, program] %></li>
<% end %>
</ul>
</div>
</div>
<table class="<%= table_classes %>">
<tbody>
<tr>
<td width="150"><%= Education::Teacher.human_attribute_name('slug') %></td>
<td><%= @teacher.slug %></td>
</tr>
<% if @teacher.user %>
<tr>
<td width="150"><%= Education::Teacher.human_attribute_name('user') %></td>
<td><%= link_to_if can?(:read, @teacher.user), @teacher.user, admin_user_path(@teacher.user) %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<% end %>
</div>
......
......@@ -40,6 +40,7 @@ en:
name: Name
phone: Phone
programs: Programs provided
websites: Associated websites
zipcode: Zipcode
education/teacher:
biography: Biography
......
......@@ -40,6 +40,7 @@ fr:
name: Nom
phone: Téléphone
programs: Formations dispensées
websites: Sites webs associés
zipcode: Code postal
education/teacher:
biography: Biographie
......
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