diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 3394ba2..ec550a3 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -13,12 +13,7 @@
else
existing_user = User.find_by_email(sign_up_params[:email])
if !existing_user.nil? then
- if (existing_user.password == "" || existing_user.password.nil?) && existing_user.confirmed_at.nil? then
- @user = existing_user
- do_update(false, true)
- else
- redirect_to after_sign_up_error_path_for(resource), alert: I18n.t('helpers.email_already_registered')
- end
+ redirect_to after_sign_up_error_path_for(resource), alert: I18n.t('helpers.email_already_registered')
else
build_resource(sign_up_params)
if resource.save
diff --git a/app/controllers/settings/projects_controller.rb b/app/controllers/settings/projects_controller.rb
index 6ba2cd3..8b0f800 100644
--- a/app/controllers/settings/projects_controller.rb
+++ b/app/controllers/settings/projects_controller.rb
@@ -36,7 +36,7 @@
@settings = current_user.settings(:plan_list)
# :name column should always be present (displayed as a disabled checkbox)
# so it's not necessary to include it in the list here
- @all_columns -= [:name]
+ @all_columns -= ['name']
end
def settings_json
diff --git a/app/models/exported_plan.rb b/app/models/exported_plan.rb
index 2ea784b..d062473 100644
--- a/app/models/exported_plan.rb
+++ b/app/models/exported_plan.rb
@@ -92,18 +92,18 @@
def as_txt
output = "#{self.plan.project.title}\n\n#{self.plan.version.phase.title}\n"
-
-
-puts "SETTINGS: #{self.plan.inspect}"
-
- output += "\nDetails:\n#{self.plan.settings[:export][:fields][:admin].collect{|f| f.to_s}.join('\n')}\n"
+ output += "\nDetails:\n\n"
+ attrs = self.plan.settings(:export)[:value]['fields'][:admin].collect{|f| f.to_s}
+ attrs.each do |attr|
+ output += attr + ": " + self.send(attr) + "\n"
+ end
self.sections.each do |section|
output += "\n#{section.title}\n"
self.questions_for_section(section).each do |question|
qtext = sanitize_text( question.text.gsub(/
/, ' * ') )
- output += "\n#{qtext}\n"
+ output += "\n* #{qtext}"
answer = self.plan.answer(question.id, false)
if answer.nil? || answer.text.nil? then
diff --git a/app/models/user.rb b/app/models/user.rb
index ff6a149..f6fbde2 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -261,4 +261,21 @@
end
end
end
+
+
+
+
+ # this generates a reset password link for a given user
+ # which can then be sent to them with the appropriate host
+ # prepended.
+ def reset_password_link
+ raw, enc = Devise.token_generator.generate(self.class, :reset_password_token)
+ self.reset_password_token = enc
+ self.reset_password_sent_at = Time.now.utc
+ save(validate: false)
+
+ edit_user_password_path + '?reset_password_token=' + raw
+ end
+
+
end
diff --git a/app/views/dmptemplates/_add_question.html.erb b/app/views/dmptemplates/_add_question.html.erb
index 1caf54c..b9bbfc8 100644
--- a/app/views/dmptemplates/_add_question.html.erb
+++ b/app/views/dmptemplates/_add_question.html.erb
@@ -38,7 +38,11 @@
<%= f.select :question_format_id,
- options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title(t("helpers.text_area")).id),
+ #options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title(t("helpers.text_area")).id),
+ # the above was the line but it doesn't work because in the DB
+ # the QuestionFormat title is in English (Text area)
+ # but the above uses the Fr translation and so gets a nil
+ options_from_collection_for_select(QuestionFormat.all.order("title"), :id, :title, QuestionFormat.find_by_title("Text area").id),
{}, :id => "new-select-format-#{section.id}"%>
diff --git a/app/views/dmptemplates/_admin_nav_tabs.html.erb b/app/views/dmptemplates/_admin_nav_tabs.html.erb
index 49c3c20..e2237ea 100644
--- a/app/views/dmptemplates/_admin_nav_tabs.html.erb
+++ b/app/views/dmptemplates/_admin_nav_tabs.html.erb
@@ -10,7 +10,7 @@
<%= link_to t('org_admin.templates.template_details'), admin_template_dmptemplate_path(dmptemplate) %>
- <% dmptemplate.phases.each do |phase| %>
+ <% dmptemplate.phases.order(:number).each do |phase| %>
<% if active == phase.id then %>
diff --git a/config/branding.yml b/config/branding.yml
index 783b2c0..578347c 100644
--- a/config/branding.yml
+++ b/config/branding.yml
@@ -1,27 +1,29 @@
defaults: &defaults
-
+ legal_entity: 'the University of Edinburgh, University of Glasgow and the University of California'
+
organisation:
- name: 'My Organisation'
- abbreviation: 'MORG'
- url: 'http://your.organisation.edu/morg/'
- email: 'your.organisation@example.edu'
+ name: 'Digital Curation Center and University of California Curation Center'
+ abbreviation: 'DCC and UC3'
+ url: 'https://github.com/DMPRoadmap/roadmap/wiki'
+ copywrite_name: 'DCC and UC3'
+ email: 'dmponline@dcc.ac.uk'
application:
name: 'DMPRoadmap'
url: 'https://github.com/DMPRoadmap/roadmap'
-
-
+ version: '0.1.0'
+ release_notes_url: 'https://github.com/DMPRoadmap/roadmap/wiki/Releases'
+ issue_list_url: 'https://github.com/DMPRoadmap/roadmap/issues'
+ user_group_subscription_url: 'http://listserv.ucop.edu/cgi-bin/wa.exe?SUBED1=ROADMAP-L&A=1'
+
development:
<<: *defaults
-
- application:
- name: 'DMPRoadmap - DEV'
test:
<<: *defaults
-
- application:
- name: 'DMPRoadmap - TEST'
+
+staging:
+ <<: *defaults
production:
<<: *defaults
\ No newline at end of file
diff --git a/config/initializers/wicked_pdf.rb.example b/config/initializers/wicked_pdf.rb.example
new file mode 100644
index 0000000..103b3e5
--- /dev/null
+++ b/config/initializers/wicked_pdf.rb.example
@@ -0,0 +1,9 @@
+module DMPRoadmap
+ class Application < Rails::Application
+
+ WickedPdf.config = {
+ :exe_path => '/usr/local/bin/wkhtmltopdf'
+ }
+
+ end
+end
\ No newline at end of file
diff --git a/config/locales/contact_us/contact_us.en-UK.yml b/config/locales/contact_us/contact_us.en-UK.yml
index 045a445..68aae56 100644
--- a/config/locales/contact_us/contact_us.en-UK.yml
+++ b/config/locales/contact_us/contact_us.en-UK.yml
@@ -14,7 +14,7 @@
email: "Email"
message: "Message"
name: "Name"
- subject: "Subjecteee"
+ subject: "Subject"
submit: "Submit"
new_formtastic:
<<: *new
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 5f4e0eb..9a889af 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -19,7 +19,7 @@
day_names: [dimanche, lundi, mardi, mercredi, jeudi, vendredi, samedi]
abbr_day_names: [DIM, LUN, MAR, MER, JEU, VEN, SAM]
- # Don't forget the nil at the beginning; there's no such thing as a 0th month
+ # Dont forget the nil at the beginning; theres no such thing as a 0th month
month_names: [~, janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre]
abbr_month_names: [~, JAN, FEV, MAR, AVR, MAI, JUN, JUL, AOU, SEP, OCT, NOV, DEC]
# Used in date_select and datetime_select.
@@ -42,23 +42,23 @@
dmponline3_text: "Version précédente de DMPonline"
dcc_name: "Digital Curation Centre"
welcome_title: "Bienvenue !"
- welcome_text: "
DMPonline est un développement du Digital Curation Centre (Centre de curation numérique britannique - DCC) pour vous aider dans la rédaction de plans de gestion de données, ou DMP.
"
- screencast_text: "Vidéo en ligne sur l'utilisation de DMPonline"
- screencast_error_text: "La balise