diff --git a/Gemfile b/Gemfile index b93b341..f53941e 100644 --- a/Gemfile +++ b/Gemfile @@ -28,10 +28,6 @@ gem 'friendly_id', '~> 5.1.0' # ------------------------------------------------ -# SUPER ADMIN SECTION -gem "administrate", :github => 'thoughtbot/administrate', :branch =>'v0.7.0' - -# ------------------------------------------------ # USERS # devise for user authentication gem 'devise', '~> 4.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 48b0ac9..3d302b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,22 +1,4 @@ GIT - remote: git://github.com/thoughtbot/administrate.git - revision: 6bc227907e8567ca9d8c51658abc92fc2b19ca2d - branch: v0.7.0 - specs: - administrate (0.7.0) - actionpack (>= 4.2, < 5.1) - actionview (>= 4.2, < 5.1) - activerecord (>= 4.2, < 5.1) - autoprefixer-rails (~> 6.0) - datetime_picker_rails (~> 0.0.7) - jquery-rails (>= 4.0) - kaminari (>= 1.0) - momentjs-rails (~> 2.8) - normalize-rails (>= 3.0) - sass-rails (~> 5.0) - selectize-rails (~> 0.6) - -GIT remote: https://github.com/vyruss/yaml_db.git revision: 00b304aeb0243b0ad1d96519564e7650c9760f21 specs: @@ -65,8 +47,6 @@ addressable (2.4.0) ansi (1.5.0) arel (6.0.3) - autoprefixer-rails (6.7.7.2) - execjs bcrypt (3.1.11) better_errors (2.1.1) coderay (>= 1.0.0) @@ -90,8 +70,6 @@ crack (0.4.3) safe_yaml (~> 1.0.0) daemons (1.2.4) - datetime_picker_rails (0.0.7) - momentjs-rails (>= 2.8.1) debug_inspector (0.0.2) devise (4.2.0) bcrypt (~> 3.0) @@ -109,7 +87,6 @@ rack (>= 1.3.0) erubis (2.7.0) eventmachine (1.2.0.1) - execjs (2.7.0) faraday (0.9.2) multipart-post (>= 1.2, < 3) faraday_middleware (0.10.0) @@ -148,10 +125,6 @@ jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) - jquery-rails (4.2.1) - rails-dom-testing (>= 1, < 3) - railties (>= 4.2.0) - thor (>= 0.14, < 2.0) json (1.8.6) jwt (1.5.6) kaminari (1.0.1) @@ -197,15 +170,12 @@ builder minitest (>= 5.0) ruby-progressbar - momentjs-rails (2.17.1) - railties (>= 3.1) multi_json (1.13.1) multi_xml (0.6.0) multipart-post (2.0.0) mysql2 (0.3.21) nokogiri (1.8.2) mini_portile2 (~> 2.3.0) - normalize-rails (4.1.1) oauth2 (1.4.0) faraday (>= 0.8, < 0.13) jwt (~> 1.0) @@ -270,15 +240,7 @@ ruby_dig (0.0.2) rubyzip (1.2.0) safe_yaml (1.0.4) - sass (3.4.22) - sass-rails (5.0.6) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) sax-machine (1.3.2) - selectize-rails (0.12.4) simplecov (0.12.0) docile (~> 1.1.0) json (>= 1.8, < 3) @@ -302,7 +264,6 @@ rack (>= 1, < 3) thor (0.19.1) thread_safe (0.3.6) - tilt (2.0.5) tzinfo (1.2.5) thread_safe (~> 0.1) warden (1.2.6) @@ -326,7 +287,6 @@ ruby DEPENDENCIES - administrate! better_errors (~> 2.1.1) binding_of_caller (~> 0.7.2) byebug (~> 9.0) diff --git a/app/controllers/admin/annotations_controller.rb b/app/controllers/admin/annotations_controller.rb deleted file mode 100644 index f0881d1..0000000 --- a/app/controllers/admin/annotations_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class AnnotationsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Annotation. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Annotation.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/answers_controller.rb b/app/controllers/admin/answers_controller.rb deleted file mode 100644 index 8960f9f..0000000 --- a/app/controllers/admin/answers_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class AnswersController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Answer. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Answer.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/application_controller.rb b/app/controllers/admin/application_controller.rb deleted file mode 100644 index 0018efc..0000000 --- a/app/controllers/admin/application_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -# All Administrate controllers inherit from this `Admin::ApplicationController`, -# making it the ideal place to put authentication logic or other -# before_actions. -# -# If you want to add pagination or other controller-level concerns, -# you're free to overwrite the RESTful controller actions. -module Admin - class ApplicationController < Administrate::ApplicationController - before_action :authenticate_admin - - protect_from_forgery with: :exception - include Pundit - rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized - - def authenticate_admin - redirect_to root_path unless user_signed_in? && current_user.can_super_admin? - end - - # Override this value to specify the number of elements to display at a time - # on index pages. Defaults to 20. - # def records_per_page - # params[:per_page] || 20 - # end - end -end diff --git a/app/controllers/admin/exported_plans_controller.rb b/app/controllers/admin/exported_plans_controller.rb deleted file mode 100644 index e4bde90..0000000 --- a/app/controllers/admin/exported_plans_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class ExportedPlansController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = ExportedPlan. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # ExportedPlan.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/guidance_groups_controller.rb b/app/controllers/admin/guidance_groups_controller.rb deleted file mode 100644 index 95d3e7c..0000000 --- a/app/controllers/admin/guidance_groups_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class GuidanceGroupsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = GuidanceGroup. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # GuidanceGroup.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/guidances_controller.rb b/app/controllers/admin/guidances_controller.rb deleted file mode 100644 index 1f2495f..0000000 --- a/app/controllers/admin/guidances_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class GuidancesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Guidance. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Guidance.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/identifier_schemes_controller.rb b/app/controllers/admin/identifier_schemes_controller.rb deleted file mode 100644 index eb50d8a..0000000 --- a/app/controllers/admin/identifier_schemes_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class IdentifierSchemesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = IdentifierScheme. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # IdentifierScheme.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/languages_controller.rb b/app/controllers/admin/languages_controller.rb deleted file mode 100644 index e58baa9..0000000 --- a/app/controllers/admin/languages_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class LanguagesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Language. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Language.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/notes_controller.rb b/app/controllers/admin/notes_controller.rb deleted file mode 100644 index db832f4..0000000 --- a/app/controllers/admin/notes_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class NotesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Note. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Note.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/orgs_controller.rb b/app/controllers/admin/orgs_controller.rb deleted file mode 100644 index d68f358..0000000 --- a/app/controllers/admin/orgs_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class OrgsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Org. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Org.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/perms_controller.rb b/app/controllers/admin/perms_controller.rb deleted file mode 100644 index 99e9b95..0000000 --- a/app/controllers/admin/perms_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class PermsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Perm. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Perm.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/phases_controller.rb b/app/controllers/admin/phases_controller.rb deleted file mode 100644 index de6e3c3..0000000 --- a/app/controllers/admin/phases_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class PhasesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Phase. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Phase.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/plan_guidance_groups_controller.rb b/app/controllers/admin/plan_guidance_groups_controller.rb deleted file mode 100644 index 0eeb458..0000000 --- a/app/controllers/admin/plan_guidance_groups_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class PlanGuidanceGroupsController < Admin::ApplicationController - # To customize the behavior of this controller, - # simply overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = PlanGuidanceGroup. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # PlanGuidanceGroup.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/plans_controller.rb b/app/controllers/admin/plans_controller.rb deleted file mode 100644 index 424389f..0000000 --- a/app/controllers/admin/plans_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class PlansController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Plan. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Plan.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/question_formats_controller.rb b/app/controllers/admin/question_formats_controller.rb deleted file mode 100644 index 1338b69..0000000 --- a/app/controllers/admin/question_formats_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class QuestionFormatsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = QuestionFormat. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # QuestionFormat.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/question_options_controller.rb b/app/controllers/admin/question_options_controller.rb deleted file mode 100644 index 103e543..0000000 --- a/app/controllers/admin/question_options_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class QuestionOptionsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = QuestionOption. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # QuestionOption.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/questions_controller.rb b/app/controllers/admin/questions_controller.rb deleted file mode 100644 index be5d2a7..0000000 --- a/app/controllers/admin/questions_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class QuestionsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Question. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Question.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/regions_controller.rb b/app/controllers/admin/regions_controller.rb deleted file mode 100644 index 6e5627b..0000000 --- a/app/controllers/admin/regions_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class RegionsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Region. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Region.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/roles_controller.rb b/app/controllers/admin/roles_controller.rb deleted file mode 100644 index 748c165..0000000 --- a/app/controllers/admin/roles_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class RolesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Role. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Role.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/sections_controller.rb b/app/controllers/admin/sections_controller.rb deleted file mode 100644 index 3b94a0a..0000000 --- a/app/controllers/admin/sections_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class SectionsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Section. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Section.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/splash_logs_controller.rb b/app/controllers/admin/splash_logs_controller.rb deleted file mode 100644 index aa3fa22..0000000 --- a/app/controllers/admin/splash_logs_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class SplashLogsController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = SplashLog. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # SplashLog.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/templates_controller.rb b/app/controllers/admin/templates_controller.rb deleted file mode 100644 index 8ac79e1..0000000 --- a/app/controllers/admin/templates_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class TemplatesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Template. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Template.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/themes_controller.rb b/app/controllers/admin/themes_controller.rb deleted file mode 100644 index 9617c6c..0000000 --- a/app/controllers/admin/themes_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class ThemesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = Theme. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # Theme.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/token_permission_types_controller.rb b/app/controllers/admin/token_permission_types_controller.rb deleted file mode 100644 index 37b3487..0000000 --- a/app/controllers/admin/token_permission_types_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class TokenPermissionTypesController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = TokenPermissionType. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # TokenPermissionType.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/user_identifiers_controller.rb b/app/controllers/admin/user_identifiers_controller.rb deleted file mode 100644 index bdf5faa..0000000 --- a/app/controllers/admin/user_identifiers_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class UserIdentifiersController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = UserIdentifier. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # UserIdentifier.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb deleted file mode 100644 index 70251c0..0000000 --- a/app/controllers/admin/users_controller.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Admin - class UsersController < Admin::ApplicationController - # To customize the behavior of this controller, - # you can overwrite any of the RESTful actions. For example: - # - # def index - # super - # @resources = User. - # page(params[:page]). - # per(10) - # end - - # Define a custom finder by overriding the `find_resource` method: - # def find_resource(param) - # User.find_by!(slug: param) - # end - - # See https://administrate-prototype.herokuapp.com/customizing_controller_actions - # for more information - end -end diff --git a/app/dashboards/annotation_dashboard.rb b/app/dashboards/annotation_dashboard.rb deleted file mode 100644 index e26b609..0000000 --- a/app/dashboards/annotation_dashboard.rb +++ /dev/null @@ -1,60 +0,0 @@ -require "administrate/base_dashboard" - -class AnnotationDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - org: Field::BelongsTo, - question: Field::BelongsTo, - id: Field::Number, - text: Field::Text, - type: Field::String.with_options(searchable: false), - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :org, - :question, - :id, - :text, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :org, - :question, - :id, - :text, - :type, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :org, - :question, - :text, - :type, - ].freeze - - # Overwrite this method to customize how annotations are displayed - # across all pages of the admin dashboard. - # - # def display_resource(annotation) - # "Annotation ##{annotation.id}" - # end -end diff --git a/app/dashboards/answer_dashboard.rb b/app/dashboards/answer_dashboard.rb deleted file mode 100644 index ad7df7f..0000000 --- a/app/dashboards/answer_dashboard.rb +++ /dev/null @@ -1,69 +0,0 @@ -require "administrate/base_dashboard" - -class AnswerDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - question: Field::BelongsTo, - user: Field::BelongsTo, - plan: Field::BelongsTo, - notes: Field::HasMany, - question_options: Field::HasMany, - id: Field::Number, - text: Field::Text, - created_at: Field::DateTime, - updated_at: Field::DateTime, - lock_version: Field::Number, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :question, - :user, - :plan, - :notes, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :question, - :user, - :plan, - :notes, - :question_options, - :id, - :text, - :created_at, - :updated_at, - :lock_version, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :question, - :user, - :plan, - :notes, - :question_options, - :text, - :lock_version, - ].freeze - - # Overwrite this method to customize how answers are displayed - # across all pages of the admin dashboard. - # - # def display_resource(answer) - # "Answer ##{answer.id}" - # end -end diff --git a/app/dashboards/exported_plan_dashboard.rb b/app/dashboards/exported_plan_dashboard.rb deleted file mode 100644 index ec618cf..0000000 --- a/app/dashboards/exported_plan_dashboard.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "administrate/base_dashboard" - -class ExportedPlanDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - plan: Field::BelongsTo, - user: Field::BelongsTo, - setting_objects: Field::HasMany.with_options(class_name: "Settings::Template"), - id: Field::Number, - format: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - phase_id: Field::Number, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :plan, - :user, - :setting_objects, - :id, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :plan, - :user, - :setting_objects, - :id, - :format, - :created_at, - :updated_at, - :phase_id, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :plan, - :user, - :setting_objects, - :format, - :phase_id, - ].freeze - - # Overwrite this method to customize how exported plans are displayed - # across all pages of the admin dashboard. - # - # def display_resource(exported_plan) - # "ExportedPlan ##{exported_plan.id}" - # end -end diff --git a/app/dashboards/guidance_dashboard.rb b/app/dashboards/guidance_dashboard.rb deleted file mode 100644 index c76c41b..0000000 --- a/app/dashboards/guidance_dashboard.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "administrate/base_dashboard" - -class GuidanceDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - guidance_group: Field::BelongsTo, - themes: Field::HasMany, - id: Field::Number, - text: Field::Text, - created_at: Field::DateTime, - updated_at: Field::DateTime, - question_id: Field::Number, - published: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :guidance_group, - :themes, - :id, - :text, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :guidance_group, - :themes, - :id, - :text, - :created_at, - :updated_at, - :question_id, - :published, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :guidance_group, - :themes, - :text, - :question_id, - :published, - ].freeze - - # Overwrite this method to customize how guidances are displayed - # across all pages of the admin dashboard. - # - # def display_resource(guidance) - # "Guidance ##{guidance.id}" - # end -end diff --git a/app/dashboards/guidance_group_dashboard.rb b/app/dashboards/guidance_group_dashboard.rb deleted file mode 100644 index 76e2f09..0000000 --- a/app/dashboards/guidance_group_dashboard.rb +++ /dev/null @@ -1,70 +0,0 @@ -require "administrate/base_dashboard" - -class GuidanceGroupDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - org: Field::BelongsTo, - guidances: Field::HasMany, - plans: Field::HasMany, - id: Field::Number, - name: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - optional_subset: Field::Boolean, - published: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :name, - :org, - :guidances, -# :plans, - :id, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :org, - :guidances, -# :plans, - :id, - :name, - :created_at, - :updated_at, - :optional_subset, - :published, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :org, - :guidances, -# :plans, - :name, - :optional_subset, - :published, - ].freeze - - # Overwrite this method to customize how guidance groups are displayed - # across all pages of the admin dashboard. - # - # def display_resource(guidance_group) - # "GuidanceGroup ##{guidance_group.id}" - # end - def display_resource(guidance_group) - guidance_group.name - end -end diff --git a/app/dashboards/identifier_scheme_dashboard.rb b/app/dashboards/identifier_scheme_dashboard.rb deleted file mode 100644 index 7dc1dca..0000000 --- a/app/dashboards/identifier_scheme_dashboard.rb +++ /dev/null @@ -1,68 +0,0 @@ -require "administrate/base_dashboard" - -class IdentifierSchemeDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - user_identifiers: Field::HasMany, - users: Field::HasMany, - id: Field::Number, - name: Field::String, - description: Field::String, - active: Field::Boolean, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :name, - :description, - :user_identifiers, - :users, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :user_identifiers, - :users, - :id, - :name, - :description, - :active, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :user_identifiers, - :users, - :name, - :description, - :active, - ].freeze - - # Overwrite this method to customize how identifier schemes are displayed - # across all pages of the admin dashboard. - # - # def display_resource(identifier_scheme) - # "IdentifierScheme ##{identifier_scheme.id}" - # end - - def display_resource(identifier_scheme) - identifier_scheme.description - end - -end diff --git a/app/dashboards/language_dashboard.rb b/app/dashboards/language_dashboard.rb deleted file mode 100644 index c888a7d..0000000 --- a/app/dashboards/language_dashboard.rb +++ /dev/null @@ -1,68 +0,0 @@ -require "administrate/base_dashboard" - -class LanguageDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - users: Field::HasMany, - orgs: Field::HasMany, - id: Field::Number, - abbreviation: Field::String, - description: Field::String, - name: Field::String, - default_language: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :abbreviation, - :name, - :users, - :orgs, - :default_language, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :users, - :orgs, - :id, - :abbreviation, - :description, - :name, - :default_language, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - # :users, - # :orgs, - :abbreviation, - :description, - :name, - :default_language, - ].freeze - - # Overwrite this method to customize how languages are displayed - # across all pages of the admin dashboard. - # - # def display_resource(language) - # "Language ##{language.id}" - # end - - def display_resource(language) - language.abbreviation - end - -end diff --git a/app/dashboards/note_dashboard.rb b/app/dashboards/note_dashboard.rb deleted file mode 100644 index 5912418..0000000 --- a/app/dashboards/note_dashboard.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "administrate/base_dashboard" - -class NoteDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - answer: Field::BelongsTo, - user: Field::BelongsTo, - id: Field::Number, - text: Field::Text, - archived: Field::Boolean, - archived_by: Field::Number, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :answer, - :user, - :id, - :text, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :answer, - :user, - :id, - :text, - :archived, - :archived_by, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :answer, - :user, - :text, - :archived, - :archived_by, - ].freeze - - # Overwrite this method to customize how notes are displayed - # across all pages of the admin dashboard. - # - # def display_resource(note) - # "Note ##{note.id}" - # end -end diff --git a/app/dashboards/org_dashboard.rb b/app/dashboards/org_dashboard.rb deleted file mode 100644 index 72f8962..0000000 --- a/app/dashboards/org_dashboard.rb +++ /dev/null @@ -1,115 +0,0 @@ -require "administrate/base_dashboard" - -class OrgDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - language: Field::BelongsTo, - guidance_groups: Field::HasMany, - templates: Field::HasMany, - users: Field::HasMany, - annotations: Field::HasMany, - token_permission_types: Field::HasMany, - id: Field::Number, - name: Field::String, - abbreviation: Field::String, - target_url: Field::String, - wayfless_entity: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - parent_id: Field::Number, - is_other: Field::Boolean, - sort_name: Field::String, - banner_text: Field::Text, - logo_file_name: Field::String, - region_id: Field::Number, - logo_uid: Field::String, - logo_name: Field::String, - contact_email: Field::String, - org_type: Field::Number, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :name, - :abbreviation, - :language, - :guidance_groups, -# :templates, - :contact_email, - :org_type, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :name, - :abbreviation, - :language, - :guidance_groups, -# :templates, - :contact_email, - :org_type, - :users, - :annotations, - :token_permission_types, - :id, - :target_url, - :wayfless_entity, - :created_at, - :updated_at, - :parent_id, - :is_other, - :sort_name, - :banner_text, - :logo_file_name, - :region_id, - :logo_uid, - :logo_name, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :language, - :guidance_groups, -# :templates, -# :users, -# :annotations, - :token_permission_types, - :name, - :abbreviation, - :target_url, - :wayfless_entity, - :parent_id, - :is_other, - :sort_name, - :banner_text, - :logo_file_name, - :region_id, - :logo_uid, - :logo_name, - :contact_email, - :org_type, - ].freeze - - # Overwrite this method to customize how orgs are displayed - # across all pages of the admin dashboard. - # - # def display_resource(org) - # "Org ##{org.id}" - # end - - def display_resource(org) - org.name - end -end diff --git a/app/dashboards/perm_dashboard.rb b/app/dashboards/perm_dashboard.rb deleted file mode 100644 index dc9e20b..0000000 --- a/app/dashboards/perm_dashboard.rb +++ /dev/null @@ -1,59 +0,0 @@ -require "administrate/base_dashboard" - -class PermDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - users: Field::HasMany, - id: Field::Number, - name: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :id, - :name, - :users, - :created_at, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :id, - :name, - :users, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ -# :users, - :name, - ].freeze - - # Overwrite this method to customize how perms are displayed - # across all pages of the admin dashboard. - # - # def display_resource(perm) - # "Perm ##{perm.id}" - # end - - def display_resource(perm) - perm.name - end - -end diff --git a/app/dashboards/phase_dashboard.rb b/app/dashboards/phase_dashboard.rb deleted file mode 100644 index 966961b..0000000 --- a/app/dashboards/phase_dashboard.rb +++ /dev/null @@ -1,72 +0,0 @@ -require "administrate/base_dashboard" - -class PhaseDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - template: Field::BelongsTo, - sections: Field::HasMany, - questions: Field::HasMany, - id: Field::Number, - title: Field::String, - description: Field::Text, - number: Field::Number, - created_at: Field::DateTime, - updated_at: Field::DateTime, - slug: Field::String, - modifiable: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :template, - :sections, - :questions, - :id, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :template, - :sections, - :questions, - :id, - :title, - :description, - :number, - :created_at, - :updated_at, - :slug, - :modifiable, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :template, - :sections, - :questions, - :title, - :description, - :number, - :slug, - :modifiable, - ].freeze - - # Overwrite this method to customize how phases are displayed - # across all pages of the admin dashboard. - # - # def display_resource(phase) - # "Phase ##{phase.id}" - # end -end diff --git a/app/dashboards/plan_dashboard.rb b/app/dashboards/plan_dashboard.rb deleted file mode 100644 index e22c30f..0000000 --- a/app/dashboards/plan_dashboard.rb +++ /dev/null @@ -1,114 +0,0 @@ -require "administrate/base_dashboard" - -class PlanDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - template: Field::BelongsTo, - phases: Field::HasMany, - sections: Field::HasMany, - questions: Field::HasMany, - themes: Field::HasMany, - answers: Field::HasMany, - notes: Field::HasMany, - roles: Field::HasMany, - users: Field::HasMany, - guidance_groups: Field::HasMany, - exported_plans: Field::HasMany, - setting_objects: Field::HasMany.with_options(class_name: "Settings::Template"), - id: Field::Number, - title: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - slug: Field::String, - grant_number: Field::String, - identifier: Field::String, - description: Field::Text, - principal_investigator: Field::String, - principal_investigator_identifier: Field::String, - data_contact: Field::String, - funder_name: Field::String, - visibility: Field::String.with_options(searchable: false), - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :template, - :phases, - :sections, - :questions, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :template, - :phases, - :sections, - :questions, - :themes, - :answers, - :notes, - :roles, - :users, - :guidance_groups, - :exported_plans, - :setting_objects, - :id, - :title, - :created_at, - :updated_at, - :slug, - :grant_number, - :identifier, - :description, - :principal_investigator, - :principal_investigator_identifier, - :data_contact, - :funder_name, - :visibility, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :template, - :phases, - :sections, - :questions, - :themes, - :answers, - :notes, - :roles, - :users, - :guidance_groups, - :exported_plans, - :setting_objects, - :title, - :slug, - :grant_number, - :identifier, - :description, - :principal_investigator, - :principal_investigator_identifier, - :data_contact, - :funder_name, - :visibility, - ].freeze - - # Overwrite this method to customize how plans are displayed - # across all pages of the admin dashboard. - # - # def display_resource(plan) - # "Plan ##{plan.id}" - # end -end diff --git a/app/dashboards/plan_guidance_group_dashboard.rb b/app/dashboards/plan_guidance_group_dashboard.rb deleted file mode 100644 index 5e659c0..0000000 --- a/app/dashboards/plan_guidance_group_dashboard.rb +++ /dev/null @@ -1,57 +0,0 @@ -require "administrate/base_dashboard" - -class PlanGuidanceGroupDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - plan: Field::BelongsTo, - guidance_group: Field::BelongsTo, - id: Field::Number, - created_at: Field::DateTime, - updated_at: Field::DateTime, - selected: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :plan, - :guidance_group, - :id, - :created_at, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :plan, - :guidance_group, - :id, - :created_at, - :updated_at, - :selected, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :plan, - :guidance_group, - :selected, - ].freeze - - # Overwrite this method to customize how plan guidance groups are displayed - # across all pages of the admin dashboard. - # - # def display_resource(plans_guidance_group) - # "PlanGuidanceGroup ##{plans_guidance_group.id}" - # end -end diff --git a/app/dashboards/question_dashboard.rb b/app/dashboards/question_dashboard.rb deleted file mode 100644 index cda2c4c..0000000 --- a/app/dashboards/question_dashboard.rb +++ /dev/null @@ -1,81 +0,0 @@ -require "administrate/base_dashboard" - -class QuestionDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - answers: Field::HasMany, - question_options: Field::HasMany, - annotations: Field::HasMany, - themes: Field::HasMany, - section: Field::BelongsTo, - question_format: Field::BelongsTo, - id: Field::Number, - text: Field::Text, - default_value: Field::Text, - number: Field::Number, - created_at: Field::DateTime, - updated_at: Field::DateTime, - option_comment_display: Field::Boolean, - modifiable: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :answers, - :question_options, - :annotations, - :themes, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :answers, - :question_options, - :annotations, - :themes, - :section, - :question_format, - :id, - :text, - :default_value, - :number, - :created_at, - :updated_at, - :option_comment_display, - :modifiable, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :answers, - :question_options, - :annotations, - :themes, - :section, - :question_format, - :text, - :default_value, - :number, - :option_comment_display, - :modifiable, - ].freeze - - # Overwrite this method to customize how questions are displayed - # across all pages of the admin dashboard. - # - # def display_resource(question) - # "Question ##{question.id}" - # end -end diff --git a/app/dashboards/question_format_dashboard.rb b/app/dashboards/question_format_dashboard.rb deleted file mode 100644 index 76bbff3..0000000 --- a/app/dashboards/question_format_dashboard.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "administrate/base_dashboard" - -class QuestionFormatDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - questions: Field::HasMany, - id: Field::Number, - title: Field::String, - description: Field::Text, - created_at: Field::DateTime, - updated_at: Field::DateTime, - option_based: Field::Boolean, - formattype: Field::String.with_options(searchable: false), - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :questions, - :id, - :title, - :description, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :questions, - :id, - :title, - :description, - :created_at, - :updated_at, - :option_based, - :formattype, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :questions, - :title, - :description, - :option_based, - :formattype, - ].freeze - - # Overwrite this method to customize how question formats are displayed - # across all pages of the admin dashboard. - # - # def display_resource(question_format) - # "QuestionFormat ##{question_format.id}" - # end -end diff --git a/app/dashboards/question_option_dashboard.rb b/app/dashboards/question_option_dashboard.rb deleted file mode 100644 index 967a91d..0000000 --- a/app/dashboards/question_option_dashboard.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "administrate/base_dashboard" - -class QuestionOptionDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - question: Field::BelongsTo, - answers: Field::HasMany, - id: Field::Number, - text: Field::String, - number: Field::Number, - is_default: Field::Boolean, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :question, - :answers, - :id, - :text, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :question, - :answers, - :id, - :text, - :number, - :is_default, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :question, - :answers, - :text, - :number, - :is_default, - ].freeze - - # Overwrite this method to customize how question options are displayed - # across all pages of the admin dashboard. - # - # def display_resource(question_option) - # "QuestionOption ##{question_option.id}" - # end -end diff --git a/app/dashboards/region_dashboard.rb b/app/dashboards/region_dashboard.rb deleted file mode 100644 index 851ad0e..0000000 --- a/app/dashboards/region_dashboard.rb +++ /dev/null @@ -1,62 +0,0 @@ -require "administrate/base_dashboard" - -class RegionDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - sub_regions: Field::HasMany.with_options(class_name: "Region"), - super_region: Field::BelongsTo.with_options(class_name: "Region"), - id: Field::Number, - abbreviation: Field::String, - description: Field::String, - name: Field::String, - super_region_id: Field::Number, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :sub_regions, - :super_region, - :id, - :abbreviation, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :sub_regions, - :super_region, - :id, - :abbreviation, - :description, - :name, - :super_region_id, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :sub_regions, - :super_region, - :abbreviation, - :description, - :name, - :super_region_id, - ].freeze - - # Overwrite this method to customize how regions are displayed - # across all pages of the admin dashboard. - # - # def display_resource(region) - # "Region ##{region.id}" - # end -end diff --git a/app/dashboards/role_dashboard.rb b/app/dashboards/role_dashboard.rb deleted file mode 100644 index 0d8b9ea..0000000 --- a/app/dashboards/role_dashboard.rb +++ /dev/null @@ -1,57 +0,0 @@ -require "administrate/base_dashboard" - -class RoleDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - user: Field::BelongsTo, - plan: Field::BelongsTo, - id: Field::Number, - created_at: Field::DateTime, - updated_at: Field::DateTime, - access: Field::Number, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :user, - :plan, - :id, - :created_at, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :user, - :plan, - :id, - :created_at, - :updated_at, - :access, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :user, - :plan, - :access, - ].freeze - - # Overwrite this method to customize how roles are displayed - # across all pages of the admin dashboard. - # - # def display_resource(role) - # "Role ##{role.id}" - # end -end diff --git a/app/dashboards/section_dashboard.rb b/app/dashboards/section_dashboard.rb deleted file mode 100644 index 2dfb78b..0000000 --- a/app/dashboards/section_dashboard.rb +++ /dev/null @@ -1,72 +0,0 @@ -require "administrate/base_dashboard" - -class SectionDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - phase: Field::BelongsTo, - organisation: Field::BelongsTo, - questions: Field::HasMany, - id: Field::Number, - title: Field::String, - description: Field::Text, - number: Field::Number, - created_at: Field::DateTime, - updated_at: Field::DateTime, - published: Field::Boolean, - modifiable: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :phase, - :organisation, - :questions, - :id, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :phase, - :organisation, - :questions, - :id, - :title, - :description, - :number, - :created_at, - :updated_at, - :published, - :modifiable, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :phase, - :organisation, - :questions, - :title, - :description, - :number, - :published, - :modifiable, - ].freeze - - # Overwrite this method to customize how sections are displayed - # across all pages of the admin dashboard. - # - # def display_resource(section) - # "Section ##{section.id}" - # end -end diff --git a/app/dashboards/splash_log_dashboard.rb b/app/dashboards/splash_log_dashboard.rb deleted file mode 100644 index ed549aa..0000000 --- a/app/dashboards/splash_log_dashboard.rb +++ /dev/null @@ -1,51 +0,0 @@ -require "administrate/base_dashboard" - -class SplashLogDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - id: Field::Number, - destination: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :id, - :destination, - :created_at, - :updated_at, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :id, - :destination, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :destination, - ].freeze - - # Overwrite this method to customize how splash logs are displayed - # across all pages of the admin dashboard. - # - # def display_resource(splash_log) - # "SplashLog ##{splash_log.id}" - # end -end diff --git a/app/dashboards/template_dashboard.rb b/app/dashboards/template_dashboard.rb deleted file mode 100644 index 7a5a313..0000000 --- a/app/dashboards/template_dashboard.rb +++ /dev/null @@ -1,107 +0,0 @@ -require "administrate/base_dashboard" - -class TemplateDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - org: Field::BelongsTo, - plans: Field::HasMany, - phases: Field::HasMany, - sections: Field::HasMany, - questions: Field::HasMany, - customizations: Field::HasMany.with_options(class_name: "Template"), - dmptemplate: Field::BelongsTo.with_options(class_name: "Template"), - setting_objects: Field::HasMany.with_options(class_name: "Settings::Template"), - id: Field::Number, - title: Field::String, - description: Field::Text, - published: Field::Boolean, - locale: Field::String, - is_default: Field::Boolean, - created_at: Field::DateTime, - updated_at: Field::DateTime, - version: Field::Number, - visibility: Field::Number, - customization_of: Field::Number, - dmptemplate_id: Field::Number, - migrated: Field::Boolean, - dirty: Field::Boolean, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :title, - :description, - :org, - :plans, - :phases, - :sections, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :org, - :plans, - :phases, - :sections, - :questions, - :customizations, - :dmptemplate, - :setting_objects, - :id, - :title, - :description, - :published, - :locale, - :is_default, - :created_at, - :updated_at, - :version, - :visibility, - :customization_of, - :dmptemplate_id, - :migrated, - :dirty, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :org, - :plans, - :phases, - :sections, - :questions, - :customizations, - :dmptemplate, - :setting_objects, - :title, - :description, - :published, - :locale, - :is_default, - :version, - :visibility, - :customization_of, - :dmptemplate_id, - :migrated, - :dirty, - ].freeze - - # Overwrite this method to customize how templates are displayed - # across all pages of the admin dashboard. - # - # def display_resource(template) - # "Template ##{template.id}" - # end -end diff --git a/app/dashboards/theme_dashboard.rb b/app/dashboards/theme_dashboard.rb deleted file mode 100644 index 2be7c8d..0000000 --- a/app/dashboards/theme_dashboard.rb +++ /dev/null @@ -1,66 +0,0 @@ -require "administrate/base_dashboard" - -class ThemeDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - questions: Field::HasMany, - guidances: Field::HasMany, - id: Field::Number, - title: Field::String, - description: Field::Text, - created_at: Field::DateTime, - updated_at: Field::DateTime, - locale: Field::String, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :questions, - :guidances, - :id, - :title, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :questions, - :guidances, - :id, - :title, - :description, - :created_at, - :updated_at, - :locale, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :questions, - :guidances, - :title, - :description, - :locale, - ].freeze - - # Overwrite this method to customize how themes are displayed - # across all pages of the admin dashboard. - # - # def display_resource(theme) - # "Theme ##{theme.id}" - # end - def display_resource(theme) - "Theme: #{theme.title} (##{theme.id})" - end -end diff --git a/app/dashboards/token_permission_type_dashboard.rb b/app/dashboards/token_permission_type_dashboard.rb deleted file mode 100644 index 93deb0f..0000000 --- a/app/dashboards/token_permission_type_dashboard.rb +++ /dev/null @@ -1,61 +0,0 @@ -require "administrate/base_dashboard" - -class TokenPermissionTypeDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - orgs: Field::HasMany, - id: Field::Number, - token_type: Field::String, - text_description: Field::Text, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :orgs, - :id, - :token_type, - :text_description, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :orgs, - :id, - :token_type, - :text_description, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :orgs, - :token_type, - :text_description, - ].freeze - - # Overwrite this method to customize how token permission types are displayed - # across all pages of the admin dashboard. - # - # def display_resource(token_permission_type) - # "TokenPermissionType ##{token_permission_type.id}" - # end - def display_resource(token_permission_type) - "#{token_permission_type.token_type}: #{token_permission_type.text_description}" - end - -end diff --git a/app/dashboards/user_dashboard.rb b/app/dashboards/user_dashboard.rb deleted file mode 100644 index 4ba23ad..0000000 --- a/app/dashboards/user_dashboard.rb +++ /dev/null @@ -1,160 +0,0 @@ -require "administrate/base_dashboard" - -class UserDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - invited_by: Field::Polymorphic, - perms: Field::HasMany, - language: Field::BelongsTo, - org: Field::BelongsTo, - answers: Field::HasMany, - notes: Field::HasMany, - exported_plans: Field::HasMany, - roles: Field::HasMany, - plans: Field::HasMany, - user_identifiers: Field::HasMany, - identifier_schemes: Field::HasMany, - setting_objects: Field::HasMany.with_options(class_name: "Settings::PlanList"), - id: Field::Number, - firstname: Field::String, - surname: Field::String, - email: Field::String, - orcid_id: Field::String, - shibboleth_id: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - encrypted_password: Field::String, - reset_password_token: Field::String, - reset_password_sent_at: Field::DateTime, - remember_created_at: Field::DateTime, - sign_in_count: Field::Number, - current_sign_in_at: Field::DateTime, - last_sign_in_at: Field::DateTime, - current_sign_in_ip: Field::String, - last_sign_in_ip: Field::String, - confirmation_token: Field::String, - confirmed_at: Field::DateTime, - confirmation_sent_at: Field::DateTime, - invitation_token: Field::String, - invitation_created_at: Field::DateTime, - invitation_sent_at: Field::DateTime, - invitation_accepted_at: Field::DateTime, - other_organisation: Field::String, - accept_terms: Field::Boolean, - api_token: Field::String, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :firstname, - :surname, - :email, - :org, - :perms, - :confirmed_at, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :firstname, - :surname, - :email, - :org, - :perms, - :confirmed_at, - :id, - :invited_by, - :language, - :answers, - :notes, - :exported_plans, - :roles, - :plans, - :user_identifiers, - :identifier_schemes, - :orcid_id, - :shibboleth_id, - :created_at, - :updated_at, - :encrypted_password, - :reset_password_token, - :reset_password_sent_at, - :remember_created_at, - :sign_in_count, - :current_sign_in_at, - :last_sign_in_at, - :current_sign_in_ip, - :last_sign_in_ip, - :confirmation_token, - :confirmation_sent_at, - :invitation_token, - :invitation_created_at, - :invitation_sent_at, - :invitation_accepted_at, - :other_organisation, - :accept_terms, - :api_token, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ -# :invited_by, - :perms, - :language, - :org, -# :answers, -# :notes, -# :exported_plans, -# :roles, -# :plans, - :user_identifiers, - :identifier_schemes, - :firstname, - :surname, - :email, - :orcid_id, - :shibboleth_id, -# :encrypted_password, -# :reset_password_token, -# :reset_password_sent_at, -# :remember_created_at, -# :sign_in_count, -# :current_sign_in_at, -# :last_sign_in_at, -# :current_sign_in_ip, -# :last_sign_in_ip, -# :confirmation_token, -# :confirmed_at, -# :confirmation_sent_at, -# :invitation_token, -# :invitation_created_at, -# :invitation_sent_at, -# :invitation_accepted_at, -# :other_organisation, - :accept_terms, -# :api_token, - ].freeze - - # Overwrite this method to customize how users are displayed - # across all pages of the admin dashboard. - # - # def display_resource(user) - # "User ##{user.id}" - # end - - def display_resource(user) - "#{user.firstname} #{user.surname} (##{user.id})" - end -end diff --git a/app/dashboards/user_identifier_dashboard.rb b/app/dashboards/user_identifier_dashboard.rb deleted file mode 100644 index fc6d73e..0000000 --- a/app/dashboards/user_identifier_dashboard.rb +++ /dev/null @@ -1,62 +0,0 @@ -require "administrate/base_dashboard" - -class UserIdentifierDashboard < Administrate::BaseDashboard - # ATTRIBUTE_TYPES - # a hash that describes the type of each of the model's fields. - # - # Each different type represents an Administrate::Field object, - # which determines how the attribute is displayed - # on pages throughout the dashboard. - ATTRIBUTE_TYPES = { - user: Field::BelongsTo, - identifier_scheme: Field::BelongsTo, - id: Field::Number, - identifier: Field::String, - created_at: Field::DateTime, - updated_at: Field::DateTime, - }.freeze - - # COLLECTION_ATTRIBUTES - # an array of attributes that will be displayed on the model's index page. - # - # By default, it's limited to four items to reduce clutter on index pages. - # Feel free to add, remove, or rearrange items. - COLLECTION_ATTRIBUTES = [ - :user, - :identifier_scheme, - :id, - :identifier, - ].freeze - - # SHOW_PAGE_ATTRIBUTES - # an array of attributes that will be displayed on the model's show page. - SHOW_PAGE_ATTRIBUTES = [ - :user, - :identifier_scheme, - :id, - :identifier, - :created_at, - :updated_at, - ].freeze - - # FORM_ATTRIBUTES - # an array of attributes that will be displayed - # on the model's form (`new` and `edit`) pages. - FORM_ATTRIBUTES = [ - :user, - :identifier_scheme, - :identifier, - ].freeze - - # Overwrite this method to customize how user identifiers are displayed - # across all pages of the admin dashboard. - # - # def display_resource(user_identifier) - # "UserIdentifier ##{user_identifier.id}" - # end - - def display_resource(user_identifier) - user_identifier.identifier - end - -end diff --git a/app/views/administrate/application/_admin_header.html.erb b/app/views/administrate/application/_admin_header.html.erb deleted file mode 100644 index 115db95..0000000 --- a/app/views/administrate/application/_admin_header.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-

Super Admin area

- <%= link_to(image_tag("logo.jpg"), root_path)%> -
diff --git a/app/views/administrate/application/_navigation.html.erb b/app/views/administrate/application/_navigation.html.erb deleted file mode 100644 index a5cfa7a..0000000 --- a/app/views/administrate/application/_navigation.html.erb +++ /dev/null @@ -1,26 +0,0 @@ -<%# Hack for customisation %> - -<%# -# Navigation - -This partial is used to display the navigation in Administrate. -By default, the navigation contains navigation links -for all resources in the admin dashboard, -as defined by the routes in the `admin/` namespace -%> - - diff --git a/app/views/administrate/application/_search.html.erb b/app/views/administrate/application/_search.html.erb deleted file mode 100644 index 7145011..0000000 --- a/app/views/administrate/application/_search.html.erb +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/config/locales/administrate.en_GB.yml b/config/locales/administrate.en_GB.yml deleted file mode 100644 index 71ab348..0000000 --- a/config/locales/administrate.en_GB.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -en_GB: - administrate: - actions: - confirm: Are you sure? - destroy: Destroy - edit: Edit - show: Show - new: New - back: Back - controller: - create: - success: "%{resource} was successfully created." - destroy: - success: "%{resource} was successfully destroyed." - update: - success: "%{resource} was successfully updated." - fields: - has_many: - more: Showing %{count} of %{total_count} - none: None - polymorphic: - not_supported: Polymorphic relationship forms are not supported. - has_one: - not_supported: HasOne relationship forms are not supported.