mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-15 09:34:29 +08:00
Added form for adding new columns to samples table into dropdown [SCI-712]
This commit is contained in:
parent
94866e8994
commit
22dabd2177
5 changed files with 11 additions and 11 deletions
|
@ -1,5 +1,4 @@
|
|||
//= require datatables
|
||||
//= require jquery-ui
|
||||
|
||||
// Create custom field ajax
|
||||
$("#modal-create-custom-field").on("show.bs.modal", function(event) {
|
||||
|
|
|
@ -1603,6 +1603,11 @@ textarea.textarea-sm {
|
|||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.vis {
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
|
|
|
@ -9,11 +9,6 @@ class CustomFieldsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
if @custom_field.save
|
||||
flash[:success] = t(
|
||||
"custom_fields.create.success_flash",
|
||||
custom_field: @custom_field.name,
|
||||
organization: @organization.name
|
||||
)
|
||||
format.json {
|
||||
render json: {
|
||||
id: @custom_field.id
|
||||
|
|
|
@ -42,11 +42,11 @@
|
|||
<div id="datatables-buttons" style="display: inline;">
|
||||
<div id="samples-columns-dropdown" class="dropdown">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
<%= t("samples.columns") %>
|
||||
<%= t('samples.columns') %>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-right smart-dropdown" id="samples-columns-list">
|
||||
<li style="padding: 5px;">
|
||||
<li>
|
||||
<div id="new-column-form" class="form-group" data-action="<%= organization_custom_fields_path(@organization) %>">
|
||||
<div class="input-group">
|
||||
<input class="form-control" id="new-column-name" placeholder="<%= t("samples.column_new_text") %>">
|
||||
|
|
|
@ -798,8 +798,8 @@ en:
|
|||
success_flash: "Table result successfully deleted."
|
||||
|
||||
samples:
|
||||
columns: 'Columns'
|
||||
types_and_groups: 'Types and groups'
|
||||
columns: "Columns"
|
||||
types_and_groups: "Types and groups"
|
||||
actions: "Actions"
|
||||
add_new_sample: "Add new sample"
|
||||
import: "Import"
|
||||
|
@ -810,7 +810,6 @@ en:
|
|||
edit_sample: "Edit"
|
||||
save_sample: "Save"
|
||||
cancel_save: "Cancel"
|
||||
columns: "Columns"
|
||||
column_create: "Create"
|
||||
column_new_text: "New column"
|
||||
column_visibility: "Visible columns"
|
||||
|
@ -875,6 +874,8 @@ en:
|
|||
js:
|
||||
permission_error: "You don't have permission to edit this sample."
|
||||
not_found_error: "This sample does not exist."
|
||||
column_added: "New column was created, it will be displayed in the table after you close the dropdown."
|
||||
empty_column_name: "Please enter column name."
|
||||
sample_types:
|
||||
index:
|
||||
head_title: 'Sample Types'
|
||||
|
|
Loading…
Add table
Reference in a new issue