Skip to content

Commit

Permalink
Merge pull request #3312 from DMPRoadmap/main
Browse files Browse the repository at this point in the history
Merge latest from main into development
  • Loading branch information
briri authored May 1, 2023
2 parents 6dd914a + 0cdd9f4 commit d7d64e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,6 @@ The tool has four main functions:

Click here for the latest [releases](https://github.com/DMPRoadmap/roadmap/releases/).

#### Pre-requisites
Roadmap is a Ruby on Rails application and you will need to have:
* Ruby = 2.7.6
* Rails = 6.1
* MySQL >= 5.0 OR PostgreSQL

Further detail on how to install Ruby on Rails applications are available from the Ruby on Rails site: http://rubyonrails.org.

Further details on how to install MySQL and create your first user and database. Be sure to follow the instructions for your particular environment.
* Install: http://dev.mysql.com/downloads/mysql/
* Create a user: http://dev.mysql.com/doc/refman/5.7/en/create-user.html
* Create the database: http://dev.mysql.com/doc/refman/5.7/en/creating-database.html

You may also find the following resources handy:

* The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
* Ruby on Rails Tutorial Book: http://www.railstutorial.org/

#### Installation
See the [Installation Guide](https://github.com/DMPRoadmap/roadmap/wiki/Installation) on the Wiki.

Expand Down
6 changes: 6 additions & 0 deletions app/controllers/org_admin/templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module OrgAdmin
# Controller that handles templates
# rubocop:disable Metrics/ClassLength
class TemplatesController < ApplicationController
include Paginable
include Versionable
Expand Down Expand Up @@ -157,6 +158,10 @@ def edit
def new
authorize Template
@template = current_org.templates.new
# If the Org is a funder set the visibility to Public otherwise set to Organizational
# for Orgs that are both, the admin will see controls on the page to let them choose.
# The default is already 'organisationally_visible' so change it if this is a funder
@template.visibility = Template.visibilities[:publicly_visible] if current_org.funder?
end

# POST /org_admin/templates
Expand Down Expand Up @@ -410,4 +415,5 @@ def get_referrer(template, referrer)
end
end
end
# rubocop:enable Metrics/ClassLength
end
2 changes: 1 addition & 1 deletion app/views/org_admin/templates/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<% else %>
<%
visibility = f.object.visibility
visibility = f.object.funder? ? 'publicly_visible' : 'organisationally_visible' if visibility.nil?
visibility = f.object.org.funder? ? 'publicly_visible' : 'organisationally_visible' if visibility.nil?
%>
<%= f.hidden_field :visibility, value: visibility %>
<% end %>
Expand Down

0 comments on commit d7d64e6

Please sign in to comment.