scinote-web/app/views/my_modules/_module_header.html.erb

66 lines
2.4 KiB
Text
Raw Normal View History

<div class="header-container">
<div class="flex-block date-block">
2019-11-21 19:14:43 +08:00
<div class="flex-block-label">
<span class="fas block-icon fa-calendar-alt"></span>
2016-02-12 23:52:43 +08:00
<span class="hidden-xs hidden-sm hidden-md"><%=t "my_modules.module_header.start_date" %></span>
</div>
2019-11-21 19:14:43 +08:00
<strong><%= l(@my_module.created_at, format: :full) %></strong>
2016-02-12 23:52:43 +08:00
</div>
2019-07-09 20:00:53 +08:00
<div class="flex-block date-block" >
2019-11-21 19:14:43 +08:00
<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.html.erb",
2019-11-21 19:14:43 +08:00
locals: { my_module: @my_module } %>
</div>
2016-02-12 23:52:43 +08:00
</div>
<div class="flex-block">
2019-11-21 19:14:43 +08:00
<div class="flex-block-label">
<span class="fas block-icon fa-tachometer-alt"></span>
<%= t('my_modules.states.state_label') %>
</div>
2019-11-21 19:14:43 +08:00
<span class="task-state-label">
<%= render partial: "module_state_label.html.erb",
locals: { my_module: @my_module } %>
2019-11-21 19:14:43 +08:00
</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) %>">
2019-11-21 19:14:43 +08:00
<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) } %>
2016-02-12 23:52:43 +08:00
</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>
2016-02-12 23:52:43 +08:00
<% end %>
</div>
2016-02-12 23:52:43 +08:00
</div>
<!-- Manage tags modal -->
<%= render partial: "my_modules/modals/manage_module_tags_modal", locals: { my_module: @my_module } %>