mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 20:25:22 +08:00
fixing hound alerts
This commit is contained in:
parent
7abc8f3a90
commit
850f5d8dad
5 changed files with 23 additions and 25 deletions
|
@ -407,20 +407,21 @@ li.module-hover {
|
|||
}
|
||||
}
|
||||
|
||||
// EXPERIMENT PANEL
|
||||
|
||||
/* EXPERIMENT PANEL */
|
||||
.experiment-panel {
|
||||
max-width: 650px;
|
||||
margin: 0 auto;
|
||||
margin-top: 25px;
|
||||
margin-bottom: 15px;
|
||||
margin-top: 25px;
|
||||
max-width: 650px;
|
||||
@include box-shadow(0px 4px 8px 0px $color-dove-gray);
|
||||
}
|
||||
|
||||
.workflowimg-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
// SHOW
|
||||
.center-btn{
|
||||
|
||||
/* SHOW */
|
||||
.center-btn {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
max-width: 200px;
|
||||
|
|
|
@ -447,7 +447,7 @@ class ReportsController < ApplicationController
|
|||
def generate_project_contents_json
|
||||
res = []
|
||||
if params.include? :modules
|
||||
modules = (params[:modules].select { |_, p| p == "1" })
|
||||
modules = (params[:modules].select { |_, p| p == '1' })
|
||||
.keys
|
||||
.collect(&:to_i)
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_projects
|
||||
@project_results = []
|
||||
if @project_search_count > 0 then
|
||||
if @project_search_count > 0
|
||||
@project_results = search_by_name Project
|
||||
end
|
||||
@search_count = @project_search_count
|
||||
|
@ -133,7 +133,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_experiments
|
||||
@experiment_results = []
|
||||
if @experiment_search_count > 0 then
|
||||
if @experiment_search_count > 0
|
||||
@experiment_results = search_by_name Experiment
|
||||
end
|
||||
@search_count = @experiment_search_count
|
||||
|
@ -141,7 +141,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_workflows
|
||||
@workflow_results = []
|
||||
if @workflow_search_count > 0 then
|
||||
if @workflow_search_count > 0
|
||||
@workflow_results = search_by_name MyModuleGroup
|
||||
end
|
||||
@search_count = @workflow_search_count
|
||||
|
@ -149,7 +149,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_modules
|
||||
@module_results = []
|
||||
if @module_search_count > 0 then
|
||||
if @module_search_count > 0
|
||||
@module_results = search_by_name MyModule
|
||||
end
|
||||
@search_count = @module_search_count
|
||||
|
@ -157,7 +157,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_results
|
||||
@result_results = []
|
||||
if @result_search_count > 0 then
|
||||
if @result_search_count > 0
|
||||
@result_results = search_by_name Result
|
||||
end
|
||||
@search_count = @result_search_count
|
||||
|
@ -165,7 +165,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_tags
|
||||
@tag_results = []
|
||||
if @tag_search_count > 0 then
|
||||
if @tag_search_count > 0
|
||||
@tag_results = search_by_name Tag
|
||||
end
|
||||
@search_count = @tag_search_count
|
||||
|
@ -173,7 +173,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_reports
|
||||
@report_results = []
|
||||
if @report_search_count > 0 then
|
||||
if @report_search_count > 0
|
||||
@report_results = search_by_name Report
|
||||
end
|
||||
@search_count = @report_search_count
|
||||
|
@ -181,7 +181,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_protocols
|
||||
@protocol_results = []
|
||||
if @protocol_search_count > 0 then
|
||||
if @protocol_search_count > 0
|
||||
@protocol_results = search_by_name Protocol
|
||||
end
|
||||
@search_count = @protocol_search_count
|
||||
|
@ -189,7 +189,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_steps
|
||||
@step_results = []
|
||||
if @step_search_count > 0 then
|
||||
if @step_search_count > 0
|
||||
@step_results = search_by_name Step
|
||||
end
|
||||
@search_count = @step_search_count
|
||||
|
@ -197,7 +197,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_checklists
|
||||
@checklist_results = []
|
||||
if @checklist_search_count > 0 then
|
||||
if @checklist_search_count > 0
|
||||
@checklist_results = search_by_name Checklist
|
||||
end
|
||||
@search_count = @checklist_search_count
|
||||
|
@ -205,7 +205,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_samples
|
||||
@sample_results = []
|
||||
if @sample_search_count > 0 then
|
||||
if @sample_search_count > 0
|
||||
@sample_results = search_by_name Sample
|
||||
end
|
||||
@search_count = @sample_search_count
|
||||
|
@ -213,7 +213,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_assets
|
||||
@asset_results = []
|
||||
if @asset_search_count > 0 then
|
||||
if @asset_search_count > 0
|
||||
@asset_results = search_by_name Asset
|
||||
end
|
||||
@search_count = @asset_search_count
|
||||
|
@ -221,7 +221,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_tables
|
||||
@table_results = []
|
||||
if @table_search_count > 0 then
|
||||
if @table_search_count > 0
|
||||
@table_results = search_by_name Table
|
||||
end
|
||||
@search_count = @table_search_count
|
||||
|
@ -229,7 +229,7 @@ class SearchController < ApplicationController
|
|||
|
||||
def search_comments
|
||||
@comment_results = []
|
||||
if @comment_search_count > 0 then
|
||||
if @comment_search_count > 0
|
||||
@comment_results = search_by_name Comment
|
||||
end
|
||||
@search_count = @comment_search_count
|
||||
|
|
|
@ -3,7 +3,6 @@ require 'helpers/archivable_model_test_helper'
|
|||
require 'helpers/searchable_model_test_helper'
|
||||
|
||||
class ExperimentTest < ActiveSupport::TestCase
|
||||
|
||||
should validate_presence_of(:name)
|
||||
should validate_length_of(:name).is_at_least(4).is_at_most(50)
|
||||
should validate_presence_of(:project)
|
||||
|
@ -31,5 +30,4 @@ class ExperimentTest < ActiveSupport::TestCase
|
|||
should belong_to(:restored_by)
|
||||
should have_many(:my_modules)
|
||||
should have_many(:my_module_groups)
|
||||
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require 'rails/test_help'
|
||||
require "minitest/reporters"
|
||||
require 'minitest/reporters'
|
||||
Minitest::Reporters.use!
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
|
@ -35,7 +35,6 @@ Shoulda::Matchers.configure do |config|
|
|||
with.test_framework :minitest
|
||||
with.test_framework :minitest_4
|
||||
|
||||
|
||||
# Choose a library:
|
||||
with.library :active_record
|
||||
with.library :active_model
|
||||
|
|
Loading…
Add table
Reference in a new issue