2016-02-12 23:52:43 +08:00
|
|
|
<ul class="nav nav-tabs">
|
2016-07-21 19:11:15 +08:00
|
|
|
<li role="presentation" id="new-step-main-tab" class="active">
|
2017-11-22 23:28:14 +08:00
|
|
|
<a href="#new-step-main" data-toggle="tab" data-no-turbolink="true">
|
2018-05-22 22:55:58 +08:00
|
|
|
<span class="fas fa-pencil-alt"></span>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
2016-07-21 19:11:15 +08:00
|
|
|
<li role="presentation" id="new-step-checklists-tab">
|
2017-11-22 23:28:14 +08:00
|
|
|
<a href="#new-step-checklists" data-toggle="tab" data-no-turbolink="true">
|
2018-05-22 22:55:58 +08:00
|
|
|
<span class="fas fa-tasks"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.tab_checklists") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
2017-06-02 22:34:09 +08:00
|
|
|
<li role="presentation"
|
|
|
|
id="new-step-assets-tab"
|
2017-06-07 19:29:39 +08:00
|
|
|
onClick="dragNdropAssetsInit('steps')">
|
2017-11-22 23:28:14 +08:00
|
|
|
<a href="#new-step-assets" data-toggle="tab" data-no-turbolink="true">
|
2018-08-14 19:26:48 +08:00
|
|
|
<span class="fas fa-paperclip"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.tab_assets") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
2016-07-21 19:11:15 +08:00
|
|
|
<li role="presentation" id="new-step-tables-tab">
|
2017-11-22 23:28:14 +08:00
|
|
|
<a href="#new-step-tables" data-toggle="tab" data-no-turbolink="true">
|
2018-05-22 22:55:58 +08:00
|
|
|
<span class="fas fa-table"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.tab_tables") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane active" role="tabpanel" id="new-step-main">
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= f.text_field :name, label: t("protocols.steps.new.name"), placeholder: t("protocols.steps.new.name_placeholder") %>
|
2016-11-11 00:20:17 +08:00
|
|
|
<div class="form-group">
|
2019-03-20 00:42:49 +08:00
|
|
|
<%= f.tiny_mce_editor(:description,
|
|
|
|
id: :step_description_textarea,
|
|
|
|
hide_label: false,
|
2019-03-22 17:52:26 +08:00
|
|
|
value: sanitize_input(@step.tinymce_render(:description)),
|
2019-03-20 00:42:49 +08:00
|
|
|
data: {
|
|
|
|
object_type: 'step',
|
|
|
|
object_id: @step.id,
|
2019-04-24 18:35:01 +08:00
|
|
|
highlightjs_path: asset_path('highlightjs-github-theme.css') } ) %>
|
2016-11-11 00:20:17 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<div class="tab-pane" role="tabpanel" id="new-step-checklists">
|
|
|
|
<%= f.nested_fields_for :checklists do |ff| %>
|
|
|
|
<%= render "form_checklists.html.erb", ff: ff %>
|
|
|
|
<% end %>
|
|
|
|
<%= f.add_nested_fields_link :checklists do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-plus"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.add_checklist") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" role="tabpanel" id="new-step-assets">
|
2017-06-02 22:34:09 +08:00
|
|
|
<div class="text-center new-asset-box">
|
2018-09-14 19:07:09 +08:00
|
|
|
<span class="help_tooltips"
|
|
|
|
data-tooltiplink="<%= I18n.t('tooltips.link.protocol.step_add_files') %>"
|
|
|
|
data-tooltipcontent="<%= I18n.t('tooltips.text.protocol.step_add_files') %>">
|
2018-04-26 21:02:24 +08:00
|
|
|
<%=t 'assets.drag_n_drop.label_html' %>
|
|
|
|
<label>
|
2019-04-05 00:15:30 +08:00
|
|
|
<span class="btn btn-default new-asset-upload-button">
|
|
|
|
<span class="fas fa-file-upload new-asset-upload-icon"></span>
|
2018-04-26 21:02:24 +08:00
|
|
|
<%=t 'assets.drag_n_drop.browse_label' %>
|
|
|
|
</span>
|
2019-07-26 00:00:24 +08:00
|
|
|
<span style="display:none;">
|
|
|
|
<%= f.file_field :file,
|
|
|
|
id: "drag-n-drop-assets",
|
|
|
|
multiple: true,
|
|
|
|
direct_upload: true,
|
|
|
|
onchange: "DragNDropSteps.init(this.files)" %>
|
|
|
|
</span>
|
2017-06-02 22:34:09 +08:00
|
|
|
</label>
|
2018-08-21 17:11:25 +08:00
|
|
|
</span>
|
2017-06-02 22:34:09 +08:00
|
|
|
</div>
|
2017-11-21 20:48:06 +08:00
|
|
|
<div id="new-step-assets-group" class="form-group">
|
2019-05-13 22:53:58 +08:00
|
|
|
<div class="col-xs-12 attachments edit">
|
2019-04-09 18:28:42 +08:00
|
|
|
<%= f.nested_fields_for :assets do |ff| %>
|
2019-07-10 20:37:23 +08:00
|
|
|
<%= render partial: 'shared/asset_placeholder.html.erb',
|
2019-04-23 19:35:10 +08:00
|
|
|
locals: { edit_page: true, asset: ff.object, ff: ff } %>
|
2017-11-21 20:48:06 +08:00
|
|
|
<% end %>
|
2019-04-09 18:28:42 +08:00
|
|
|
</div>
|
2017-11-21 20:48:06 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<div class="tab-pane" role="tabpanel" id="new-step-tables">
|
|
|
|
<%= f.nested_fields_for :tables do |ff| %>
|
|
|
|
<%= render "form_tables.html.erb", ff: ff %>
|
|
|
|
<% end %>
|
|
|
|
<%= f.add_nested_fields_link :tables, id: "add-table" do %>
|
2018-07-09 19:13:44 +08:00
|
|
|
<span class="fas fa-plus"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.add_table") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2019-04-27 19:51:35 +08:00
|
|
|
</div>
|