scinote-web/app/views/reports/new/modal/_project_contents.html.erb

38 lines
1.9 KiB
Text

<%= bootstrap_form_tag remote: true, url: project_contents_project_reports_path(project, format: :json), method: :post, html: { id: "add-contents-form" } do |f| %>
<%= hidden_field_tag :id, project.id %>
<div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#tasks-tab" aria-controls="tasks-tab" role="tab" data-toggle="tab">
<span class="glyphicon glyphicon-credit-card visible-xs"></span>
<span class="hidden-xs"><%= t("projects.reports.elements.modals.project_contents.tasks_tab") %></span>
</a>
</li>
<% if project.project_my_modules.is_archived(false).exists? %>
<li role="presentation">
<a href="#content-tab" aria-controls="content-tab" role="tab" data-toggle="tab">
<span class="glyphicon glyphicon-link visible-xs"></span>
<span class="hidden-xs"><%= t("projects.reports.elements.modals.project_contents.content_tab") %></span>
</a>
</li>
<% end %>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="tasks-tab">
<h5 class="visible-xs"><%= t("projects.reports.elements.modals.project_contents.tasks_tab") %></h5>
<%= render partial: "reports/new/modal/project_contents_inner.html.erb", locals: { form: f, project: project } %>
</div>
<div role="tabpanel" class="tab-pane" id="content-tab">
<h5 class="visible-xs"><%= t("projects.reports.elements.modals.project_contents.content_tab") %></h5>
<%= render partial: "reports/new/modal/module_contents_inner.html.erb", locals: { form: f } %>
<hr>
<%= render partial: "reports/new/modal/step_contents_inner.html.erb", locals: { form: f } %>
<hr>
<%= render partial: "reports/new/modal/result_contents_inner.html.erb", locals: { form: f } %>
</div>
</div>
</div>
<% end %>