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/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/layouts/_navigation.html.erb b/app/views/layouts/_navigation.html.erb index 601034d..e4a3c9f 100644 --- a/app/views/layouts/_navigation.html.erb +++ b/app/views/layouts/_navigation.html.erb @@ -41,7 +41,7 @@ <% else %>
  • <% end %> - <%= link_to t("org_admin.user_list_label"), "/org/admin/users/admin_index", :class => "main_nav_last_li"%> + <%= link_to t("org_admin.user_list_label"), admin_index_users_path, :class => "main_nav_last_li"%>
  • <% end %> <% else %> diff --git a/app/views/static_pages/about_us.html.erb b/app/views/static_pages/about_us.html.erb index 79309fd..873c031 100644 --- a/app/views/static_pages/about_us.html.erb +++ b/app/views/static_pages/about_us.html.erb @@ -36,6 +36,7 @@ organisation_email: Rails.configuration.branding[:organisation][:email], organisation_url: Rails.configuration.branding[:organisation][:url], application_name: Rails.configuration.branding[:application][:name], + application_home: Rails.configuration.branding[:application][:home], application_url: Rails.configuration.branding[:application][:url], current_locale: I18n.locale)%> @@ -55,7 +56,8 @@ <% summary = summary.gsub(/\A.*div>/, "") %> <% summary = summary.gsub(/

    .*\z/, "") %>

    <%= raw summary.strip %>

    -

    <%= t('helpers.about.by') %><%= entry.author %><%= t('helpers.about.on') %><%= entry.published.strftime("%d/%m/%Y") %>

    + <% author = entry.author.blank? ? 'anonymous' : entry.author %> +

    <%= t('helpers.about.by') %> <%= author %> <%= t('helpers.about.on') %> <%= entry.published.strftime("%d/%m/%Y") %>

    <%= t('helpers.about.read_more') %><%= link_to "DCC Website", entry.url %>


    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/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/db/migrate/20131118094629_change_versions_published.rb b/db/migrate/20131118094629_change_versions_published.rb index dc8deb4..457fefd 100644 --- a/db/migrate/20131118094629_change_versions_published.rb +++ b/db/migrate/20131118094629_change_versions_published.rb @@ -1,5 +1,14 @@ class ChangeVersionsPublished < ActiveRecord::Migration def change - change_column :versions, :published, :boolean + add_column :versions, :published_tmp, :boolean + + Version.reset_column_information # make the new column available to model methods + Version.all.each do |v| + v.published_tmp = v.published == 't' ? true : false + v.save + end + + remove_column :versions, :published + rename_column :versions, :published_tmp, :published end end