mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-11 14:45:59 +08:00
changes create/edit mode buttons [fixes SCI-777]
This commit is contained in:
parent
8bb452e4f7
commit
d9025a9601
6 changed files with 74 additions and 86 deletions
|
|
@ -26,13 +26,16 @@
|
|||
|
||||
#remove {
|
||||
margin-left: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-inline .form-group,
|
||||
.form-inline .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#name-input {
|
||||
padding: 5px;
|
||||
width: 203px;
|
||||
}
|
||||
|
||||
.new-resource-form {
|
||||
|
|
@ -87,26 +90,6 @@
|
|||
color: $color-black;
|
||||
}
|
||||
}
|
||||
|
||||
.sample-group-controls {
|
||||
|
||||
.edit {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.delete {
|
||||
margin-top: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.sample-group-submit {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
#submit {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#new_sample_group .color-picker {
|
||||
|
|
|
|||
|
|
@ -4,28 +4,23 @@
|
|||
sample_group)%>"
|
||||
data-color="<%= sample_group.color %>">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<%= form_for [organization, sample_group], html: { class: 'form-inline' }, remote: true do |f| %>
|
||||
<div class="form-group">
|
||||
<%= f.text_field :name, value: sample_group.name , class: 'form-control' %>
|
||||
<span class="edit-confirm glyphicon glyphicon-ok"></span>
|
||||
<span class="abort glyphicon glyphicon-remove"
|
||||
data-element="<%= organization_sample_group_sample_group_element_path(organization,
|
||||
sample_group) %>"></span>
|
||||
<div class="col-xs-8">
|
||||
<div class="form-group">
|
||||
<%= f.text_field :name, value: sample_group.name , class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<button type="button"
|
||||
class="edit-confirm btn btn-primary"><%= t('general.edit') %></button>
|
||||
<button type="button"
|
||||
class="abort btn btn-default"
|
||||
data-element="<%=
|
||||
organization_sample_group_sample_group_element_path(organization,
|
||||
sample_group) %>">
|
||||
<%= t('general.cancel') %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span class="pull-right sample-group-controls">
|
||||
<span class="color-picker">
|
||||
<%= bootstrap_form_for [organization, sample_group], remote: true do |f| %>
|
||||
<%= f.color_picker_select :color,
|
||||
Constants::TAG_COLORS,
|
||||
class: 'edit-sample-group-color' %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="delete glyphicon glyphicon-trash"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -27,27 +27,25 @@
|
|||
<ul class="list-unstyled sample_types_groups_list"
|
||||
id="sample_groups_list">
|
||||
<li class="new-resource-form">
|
||||
<%= bootstrap_form_for SampleGroup.new,
|
||||
remote: true,
|
||||
html: { class: 'form-inline' },
|
||||
url: organization_sample_groups_path(current_organization) do |f| %>
|
||||
|
||||
<%= f.text_field :name,
|
||||
id: 'name-input',
|
||||
class: 'form-control',
|
||||
hide_label: true %>
|
||||
<div class="sample-group-submit">
|
||||
<span id="submit" class="glyphicon glyphicon-ok"></span>
|
||||
</div>
|
||||
<span class="pull-right sample-group-controls">
|
||||
<span class="color-picker">
|
||||
<%= f.color_picker_select :color,
|
||||
Constants::TAG_COLORS,
|
||||
class: 'new-sample-group-color' %>
|
||||
</span>
|
||||
<span id="remove" class="glyphicon glyphicon-trash"></span>
|
||||
</span>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<%= bootstrap_form_for SampleGroup.new,
|
||||
remote: true,
|
||||
html: { class: 'form-inline' },
|
||||
url: organization_sample_groups_path(current_organization) do |f| %>
|
||||
<div class="col-xs-8">
|
||||
<%= f.text_field :name,
|
||||
id: 'name-input',
|
||||
class: 'form-control',
|
||||
hide_label: true %>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<button id="submit"
|
||||
class="btn btn-primary"><%= t('general.create') %></button>
|
||||
<button id="remove"
|
||||
class="btn btn-default"><%= t('general.cancel') %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% @sample_groups.sorted.each do |sample_group| %>
|
||||
<%= render partial: 'sample_group',
|
||||
|
|
|
|||
|
|
@ -3,20 +3,22 @@
|
|||
organization_sample_type_destroy_confirmation_path(organization, sample_type)
|
||||
%>">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<%= form_for [organization, sample_type], html: { class: 'form-inline' }, remote: true do |f| %>
|
||||
<div class="form-group">
|
||||
<%= f.text_field :name, value: sample_type.name , class: 'form-control' %>
|
||||
<span class="edit-confirm glyphicon glyphicon-ok"></span>
|
||||
<span class="abort glyphicon glyphicon-remove"
|
||||
data-element="<%=
|
||||
organization_sample_type_sample_type_element_path(organization,
|
||||
sample_type) %>"></span>
|
||||
<div class="col-xs-8">
|
||||
<div class="form-group">
|
||||
<%= f.text_field :name, value: sample_type.name , class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 text-right">
|
||||
<button type="button"
|
||||
class="edit-confirm btn btn-primary"><%= t('general.edit') %></button>
|
||||
<button type="button"
|
||||
class="abort btn btn-default"
|
||||
data-element="<%=
|
||||
organization_sample_type_sample_type_element_path(organization,
|
||||
sample_type) %>">
|
||||
<%= t('general.cancel') %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span class="delete glyphicon glyphicon-trash"></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -26,18 +26,27 @@
|
|||
<ul class="list-unstyled sample_types_groups_list"
|
||||
id="sample_types_list">
|
||||
<li class="new-resource-form">
|
||||
<%= form_for SampleType.new,
|
||||
remote: true,
|
||||
html: { class: 'form-inline' },
|
||||
url: organization_sample_types_path(current_organization) do |f| %>
|
||||
<div class="form-group">
|
||||
<%= f.text_field :name, id: 'name-input', class: 'form-control' %>
|
||||
<span id="submit" class="glyphicon glyphicon-ok"></span>
|
||||
</div>
|
||||
<span class="pull-right">
|
||||
<span id="remove" class="glyphicon glyphicon-trash"></span>
|
||||
</span>
|
||||
<% end %>
|
||||
<div class="row">
|
||||
<%= form_for SampleType.new,
|
||||
remote: true,
|
||||
html: { class: 'form-inline' },
|
||||
url: organization_sample_types_path(current_organization) do |f| %>
|
||||
|
||||
<div class="col-xs-8">
|
||||
<div class="form-group">
|
||||
<%= f.text_field :name, id: 'name-input', class: 'form-control' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-right col-md-4">
|
||||
<button type="button"
|
||||
id="submit"
|
||||
class="btn btn-primary"><%= t('general.create') %></button>
|
||||
<button type="button"
|
||||
id="remove"
|
||||
class="btn btn-default"><%= t('general.cancel') %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% @sample_types.sorted.each do |sample_type| %>
|
||||
<%= render partial: 'sample_type',
|
||||
|
|
|
|||
|
|
@ -1444,6 +1444,7 @@ en:
|
|||
edit: "Edit"
|
||||
cancel: "Cancel"
|
||||
close: "Close"
|
||||
create: 'Create'
|
||||
check_all: "Check all"
|
||||
no_comments: "No comments!"
|
||||
more_comments: "More comments"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue