scinote-web/app/views/my_modules/_module_header.html.erb
2019-11-21 12:14:43 +01:00

65 lines
2.4 KiB
Text

<div class="header-container">
<div class="flex-block date-block">
<div class="flex-block-label">
<span class="fas block-icon fa-calendar-alt"></span>
<span class="hidden-xs hidden-sm hidden-md"><%=t "my_modules.module_header.start_date" %></span>
</div>
<strong><%= l(@my_module.created_at, format: :full) %></strong>
</div>
<div class="flex-block date-block" >
<span class="fas block-icon fa-calendar-alt"></span>
<span class="hidden-xs hidden-sm hidden-md"><%=t "my_modules.module_header.due_date" %></span>
<div class="due-date-container" data-update-url="<%= my_module_path(@my_module, format: :json) %>">
<%= render partial: "module_header_due_date_label.html.erb",
locals: { my_module: @my_module } %>
</div>
</div>
<div class="flex-block">
<div class="flex-block-label">
<span class="fas block-icon fa-tachometer-alt"></span>
<%= t('my_modules.states.state_label') %>
</div>
<span class="task-state-label">
<%= render partial: "module_state_label.html.erb",
locals: { my_module: @my_module } %>
</span>
</div>
</div>
<div class="complete-button-container">
<%= render partial: "my_modules/state_buttons.html.erb" %>
</div>
<div class="module-tags">
<div id="module-tags" data-module-tags-url="<%= my_module_my_module_tags_url(@my_module, format: :json) %>">
<span class="fas block-icon fa-tags"></span>
<span class="hidden-xs hidden-sm tags-title"><%=t "my_modules.module_header.tags" %></span>
<%= render partial: "my_modules/tags", locals: { my_module: @my_module, editable: can_manage_module?(@my_module) } %>
</div>
</div>
<div class="module-description">
<div class="title">
<%= t('my_modules.module_header.description_label') %>
</div>
<div class="my-module-description-content">
<% if can_manage_module?(@my_module) %>
<%= render partial: "description_form" %>
<% elsif @my_module.description.present? %>
<%= custom_auto_link(@my_module.tinymce_render(:description),
simple_format: false,
tags: %w(img),
team: current_team) %>
<% else %>
<span class="no-description"><%= t('my_modules.module_header.no_description') %></span>
<% end %>
</div>
</div>
<!-- Manage tags modal -->
<%= render partial: "my_modules/modals/manage_module_tags_modal", locals: { my_module: @my_module } %>