2016-02-12 23:52:43 +08:00
|
|
|
<%= 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">
|
2017-05-09 20:22:26 +08:00
|
|
|
<a href="#tasks-tab" aria-controls="tasks-tab" role="tab" data-toggle="tab">
|
2016-02-12 23:52:43 +08:00
|
|
|
<span class="glyphicon glyphicon-credit-card visible-xs"></span>
|
2017-05-09 20:22:26 +08:00
|
|
|
<span class="hidden-xs"><%= t("projects.reports.elements.modals.project_contents.tasks_tab") %></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
2017-05-16 00:56:41 +08:00
|
|
|
<% if project.project_my_modules.is_archived(false).exists? %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<li role="presentation">
|
2017-05-09 20:22:26 +08:00
|
|
|
<a href="#content-tab" aria-controls="content-tab" role="tab" data-toggle="tab">
|
2016-02-12 23:52:43 +08:00
|
|
|
<span class="glyphicon glyphicon-link visible-xs"></span>
|
2017-05-09 20:22:26 +08:00
|
|
|
<span class="hidden-xs"><%= t("projects.reports.elements.modals.project_contents.content_tab") %></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
2017-05-09 20:22:26 +08:00
|
|
|
<div role="tabpanel" class="tab-pane active" id="tasks-tab">
|
|
|
|
<h5 class="visible-xs"><%= t("projects.reports.elements.modals.project_contents.tasks_tab") %></h5>
|
2016-02-12 23:52:43 +08:00
|
|
|
<%= render partial: "reports/new/modal/project_contents_inner.html.erb", locals: { form: f, project: project } %>
|
|
|
|
</div>
|
2017-05-10 19:15:17 +08:00
|
|
|
<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>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|