diff options
| -rw-r--r-- | app/decorators/compliance_control_set_decorator.rb | 6 | ||||
| -rw-r--r-- | app/views/compliance_control_sets/show.html.slim | 8 | ||||
| -rw-r--r-- | db/schema.rb | 11 | 
3 files changed, 16 insertions, 9 deletions
| diff --git a/app/decorators/compliance_control_set_decorator.rb b/app/decorators/compliance_control_set_decorator.rb index 6a9040358..f4aa607e1 100644 --- a/app/decorators/compliance_control_set_decorator.rb +++ b/app/decorators/compliance_control_set_decorator.rb @@ -20,12 +20,6 @@ class ComplianceControlSetDecorator < Draper::Decorator        )      # end -    # if h.policy(ComplianceControl).create? -      links << Link.new( -        content: h.t('compliance_control_sets.actions.add_compliance_control'), -        href:  h.select_type_compliance_control_set_compliance_controls_path(object.id) -      ) -    # end      links    end diff --git a/app/views/compliance_control_sets/show.html.slim b/app/views/compliance_control_sets/show.html.slim index d7d4678ba..3b0a123aa 100644 --- a/app/views/compliance_control_sets/show.html.slim +++ b/app/views/compliance_control_sets/show.html.slim @@ -56,4 +56,12 @@                sortable: true,                cls: 'table has-filter has-search' +        .select_toolbox +          ul +            li.st_action +              = link_to select_type_compliance_control_set_compliance_controls_path(@compliance_control_set.id) +                span.fa.fa-plus +            li.st_action +              = link_to new_compliance_control_set_compliance_control_block_path(@compliance_control_set.id) +                span.fa.fa-plus-square diff --git a/db/schema.rb b/db/schema.rb index 32a867d07..3593576de 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@  #  # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170928090016) do +ActiveRecord::Schema.define(version: 20170928144740) do    # These are extensions that must be enabled in order to support this database    enable_extension "plpgsql" @@ -163,6 +163,7 @@ ActiveRecord::Schema.define(version: 20170928090016) do      t.hstore   "resource_attributes"      t.datetime "created_at",                   null: false      t.datetime "updated_at",                   null: false +    t.string   "status"    end    add_index "compliance_check_messages", ["compliance_check_id"], name: "index_compliance_check_messages_on_compliance_check_id", using: :btree @@ -174,10 +175,13 @@ ActiveRecord::Schema.define(version: 20170928090016) do      t.string   "type"      t.string   "reference"      t.hstore   "metrics" -    t.datetime "created_at", null: false -    t.datetime "updated_at", null: false +    t.datetime "created_at",              null: false +    t.datetime "updated_at",              null: false +    t.integer  "compliance_check_set_id"    end +  add_index "compliance_check_resources", ["compliance_check_set_id"], name: "index_compliance_check_resources_on_compliance_check_set_id", using: :btree +    create_table "compliance_check_sets", id: :bigserial, force: :cascade do |t|      t.integer  "referential_id"      t.integer  "compliance_control_set_id" @@ -983,6 +987,7 @@ ActiveRecord::Schema.define(version: 20170928090016) do    add_foreign_key "compliance_check_blocks", "compliance_check_sets"    add_foreign_key "compliance_check_messages", "compliance_check_resources"    add_foreign_key "compliance_check_messages", "compliance_checks" +  add_foreign_key "compliance_check_resources", "compliance_check_sets"    add_foreign_key "compliance_check_sets", "compliance_control_sets"    add_foreign_key "compliance_check_sets", "referentials"    add_foreign_key "compliance_check_sets", "workbenches" | 
