Skip to content

Commit

Permalink
Display the Field Guide with dashboard and navbar
Browse files Browse the repository at this point in the history
We want the Field Guide to share the same layout as other
admin dashboard screens.
  • Loading branch information
mark-dce committed Aug 31, 2021
1 parent bfafe65 commit 8986363
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/zizia/metadata_details_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true
module Zizia
class MetadataDetailsController < ::ApplicationController
with_themed_layout 'dashboard'

def show
@details = MetadataDetails.instance.details(work_attributes:
WorkAttributes.instance)
Expand Down
18 changes: 18 additions & 0 deletions config/features.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true
Flipflop.configure do
feature :download_csv,
default: true,
description: "Allow the user to download a CSV template from the dashboard."

feature :import_csv,
default: true,
description: "Allow the user to start a CSV import from the dashboard."

feature :new_ui,
default: true,
description: "Show new UI features and workflows."

feature :read_only,
default: false,
description: "Put the system into read-only mode. Deposits, edits, approvals and anything that makes a change to the data will be disabled."
end
6 changes: 6 additions & 0 deletions spec/dummy/spec/system/metadata_details_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
include Warden::Test::Helpers

RSpec.describe 'Viewing the field guide' do
let(:admin_user) { FactoryBot.create(:admin) }

before do
login_as admin_user
end

it 'renders correctly' do
visit('/importer_documentation/guide')
expect(page).to have_content('title')
Expand Down

0 comments on commit 8986363

Please sign in to comment.