diff --git a/Gemfile.lock b/Gemfile.lock index d981efe..31724f1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,10 @@ GIT remote: git://github.com/activeadmin/activeadmin.git +<<<<<<< HEAD + revision: cc178ad0ebe1b74729eeaa59d5c7ad9b82ed7837 +======= revision: 0a5a15b88bffbe5efad7ff2a072ec4fe6eb09511 +>>>>>>> master specs: activeadmin (1.0.0.pre4) arbre (~> 1.0, >= 1.0.2) @@ -74,7 +78,12 @@ thor (~> 0.19) builder (3.2.2) byebug (9.0.5) +<<<<<<< HEAD + cancancan (1.15.0) + capybara (2.8.0) +======= capybara (2.8.1) +>>>>>>> master addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) diff --git a/app/assets/stylesheets/admin.css.less b/app/assets/stylesheets/admin.css.less index d3b5db0..05664c9 100644 --- a/app/assets/stylesheets/admin.css.less +++ b/app/assets/stylesheets/admin.css.less @@ -1164,6 +1164,9 @@ padding:0 2px 10px 0; } +td.organisation-logo { + padding: 0 25px 10px 25px; +} table.dmp_details_table { margin: 0 0 0 0; @@ -1704,6 +1707,5 @@ width: 140px; float: right; margin-left: 1px; - } - -} \ No newline at end of file + } +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2cc96a2..5eb574e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -28,9 +28,10 @@ elsif user_signed_in? and !current_user[:language_id].nil? I18n.locale = Language.find_by_id(current_user[:language_id]).abbreviation # if user has set preferred language use it - elsif false # TODO - # use user's organization language, keep in mine the "OTHER ORG" edge case which should use english + elsif user_signed_in? and current_user.organisation.present? and !current_user.organisation[:language_id].nil? + I18n.locale = Language.find_by_id(current_user.organisation[:language_id]).abbreviation + # use user's organization language, keep in mine the "OTHER ORG" edge case which should use default language else # just use the default language, line can be commented out, included just for clarity I18n.locale = I18n.default_locale diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index 805bee9..16ea960 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -60,8 +60,12 @@ def admin_update @organisation = authorize Organisation.find(params[:id]) @organisation.banner_text = params["org_banner_text"] + @organisation.logo = params[:organisation][:logo] if params[:organisation][:logo] + assign_params = params[:organisation].dup + assign_params.delete(:logo) + respond_to do |format| - if @organisation.update_attributes(params[:organisation]) + if @organisation.update_attributes(assign_params) format.html { redirect_to admin_show_organisation_path(params[:id]), notice: I18n.t("admin.org_updated_message") } format.json { head :no_content } else diff --git a/app/controllers/token_permission_types_controller.rb b/app/controllers/token_permission_types_controller.rb index ad9b7bb..5d5c3fc 100644 --- a/app/controllers/token_permission_types_controller.rb +++ b/app/controllers/token_permission_types_controller.rb @@ -1,12 +1,9 @@ class TokenPermissionTypesController < ApplicationController - - - def index - authorize TokenPermissionType - @user = current_user - respond_to do |format| - format.html - end + def index + authorize TokenPermissionType + @user = current_user + respond_to do |format| + format.html end - + end end \ No newline at end of file diff --git a/app/models/organisation.rb b/app/models/organisation.rb index a00ff86..4db9796 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -1,31 +1,44 @@ +#require 'validators/email_validator' + class Organisation < ActiveRecord::Base include GlobalHelpers - #associations between tables - belongs_to :organisation_type - has_many :guidance_groups - has_many :dmptemplates - has_many :sections - has_many :users, through: :user_org_roles - has_many :option_warnings - has_many :suggested_answers - has_and_belongs_to_many :token_permission_types, join_table: "org_token_permissions" + + extend Dragonfly::Model::Validations - has_many :user_org_roles + #associations between tables + belongs_to :organisation_type + has_many :guidance_groups + has_many :dmptemplates + has_many :sections + has_many :users, through: :user_org_roles + has_many :option_warnings + has_many :suggested_answers + has_and_belongs_to_many :token_permission_types, join_table: "org_token_permissions" - belongs_to :parent, :class_name => 'Organisation' + belongs_to :parent, :class_name => 'Organisation' - has_one :language + has_one :language has_many :children, :class_name => 'Organisation', :foreign_key => 'parent_id' -# accepts_nested_attributes_for :organisation_type accepts_nested_attributes_for :dmptemplates accepts_nested_attributes_for :token_permission_types - attr_accessible :abbreviation, :banner_text, :description, :domain, - :logo_file_name, :name, :stylesheet_file_id, :target_url, + attr_accessible :abbreviation, :banner_text, :logo, :remove_logo, :domain, + :logo_file_name, :name, :stylesheet_file_id, :target_url, :organisation_type_id, :wayfless_entity, :parent_id, :sort_name, - :token_permission_type_ids, :language_id + :token_permission_type_ids, :language_id, :contact_email + + validates :contact_email, email: true, allow_nil: true + + # allow validations for logo upload + dragonfly_accessor :logo do + after_assign :resize_image + end + + validates_property :height, of: :logo, in: (0..100) + validates_property :format, of: :logo, in: ['jpeg', 'png', 'gif','jpg','bmp'] + validates_size_of :logo, maximum: 500.kilobytes ## # returns the name of the organisation @@ -167,4 +180,16 @@ end end end + + private + ## + # checks size of logo and resizes if necessary + # + def resize_image + unless logo.nil? + if logo.height != 100 + self.logo = logo.thumb('x100') # resize height and maintain aspect ratio + end + end + end end diff --git a/app/validators/email_validator.rb b/app/validators/email_validator.rb new file mode 100644 index 0000000..d47e7c1 --- /dev/null +++ b/app/validators/email_validator.rb @@ -0,0 +1,7 @@ +class EmailValidator < ActiveModel::EachValidator + def validate_each(record, attribute, value) + unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i + record.errors[attribute] << (options[:message] || "is not a valid email address") + end + end +end \ No newline at end of file diff --git a/app/views/layouts/_dmponline_header.html.erb b/app/views/layouts/_dmponline_header.html.erb index 35114da..65c5036 100644 --- a/app/views/layouts/_dmponline_header.html.erb +++ b/app/views/layouts/_dmponline_header.html.erb @@ -3,7 +3,7 @@
diff --git a/app/views/layouts/_dmponline_org_branding.html.erb b/app/views/layouts/_dmponline_org_branding.html.erb index 3a0b3a1..e91e51a 100644 --- a/app/views/layouts/_dmponline_org_branding.html.erb +++ b/app/views/layouts/_dmponline_org_branding.html.erb @@ -1,34 +1,23 @@ - -
- <% if user_signed_in? then%> - <% if current_user.organisation.present? then%> - - <% if current_user.organisation.logo_file_name.present? then%> - - <%end%> - - - <% if current_user.organisation.banner_text.present? then%> -
- - <%= raw current_user.organisation.banner_text %> - -
- - <%end%> - <%end%> - - <%end%> + +
+ <% if user_signed_in? %> + <% if !current_user.organisation.present? %> + + <% if current_user.organisation.logo.present? %> + + <% end %> + + + <% if current_user.organisation.banner_text.present? %> +
+ + <%= raw current_user.organisation.banner_text %> + +
+ <%end%> + + <%end%> + <%end%>
\ No newline at end of file diff --git a/app/views/organisations/admin_edit.html.erb b/app/views/organisations/admin_edit.html.erb index c772adb..e6d65e8 100644 --- a/app/views/organisations/admin_edit.html.erb +++ b/app/views/organisations/admin_edit.html.erb @@ -6,14 +6,84 @@
- -
+ +
+ <%= form_for(@organisation, :url => admin_update_organisation_path(@organisation), :html => { :multipart => true, :id => "edit_org_details", :method => :put}) do |f| %> + + + + + + + + + + + + + <% if @organisation.logo.present? then%> + + + + + + + + + <%end%> + + + + + + + - <%= form_for(@organisation, :url => admin_update_organisation_path(@organisation), :html => {:id => "edit_org_details", :method => :put}) do |f| %> - - <% if @organisation.logo_file_name.present? then %> -
- <%= image_tag("#{@organisation.logo_file_name}", class: "org_logo_admin_area") %> +
+ + + + + + + + + + + + + + + + + +
<%= t('org_admin.org_name') %><%= f.text_field :name, + :as => :string, + :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.name_help_text') %>
<%= t('org_admin.org_abbr') %>
+ <%= f.text_field :abbreviation, + :as => :string, + :class => 'text_field' %> +
+
+ <%= link_to( image_tag('help_button.png'), '#', :class => 'org_abbr_popover', :rel => "popover", 'data-html' => "true", 'data-content' => t('org_admin.templates.desc_help_text_html'))%> +
+
+
<%= t('org_admin.org_logo') %><%= image_tag @organisation.logo.url %>
<%= f.check_box :remove_logo %>   <%= t('org_admin.remove_logo') %>
<%= t('org_admin.new_org_logo') %><%= f.file_field :logo %>
<%= t('org_admin.org_banner_text') %> + <%= text_area_tag("org_banner_text", @organisation.banner_text, class: "tinymce") %> +
<%= t('org_admin.org_target_url') %><%= f.text_field :target_url, + :as => :string, + :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.target_url_help_text') %>
<%= t('org_admin.org_contact_email') %><%= f.text_field :contact_email, + :as => :string, + :class => 'text_field has-tooltip', 'data-toggle' => "tooltip", 'title' => t('org_admin.org_contact_email_help_text') %>
<%= t('org_admin.org_type') %><%= @organisation.organisation_type.name %>
+ +
+
+ + + +
+ <%= f.submit t('helpers.submit.save'), :class => 'btn btn-primary' %> + <%= link_to t('helpers.submit.cancel'), :back, :class => 'btn btn-primary' %>
<% end %> @@ -96,3 +166,4 @@
<%= tinymce :content_css => asset_path('application.css') %> + diff --git a/app/views/organisations/admin_show.html.erb b/app/views/organisations/admin_show.html.erb index 9c77c46..6c32864 100644 --- a/app/views/organisations/admin_show.html.erb +++ b/app/views/organisations/admin_show.html.erb @@ -6,26 +6,23 @@ <%= t('org_admin.org_text')%>
-
- - <% if @organisation.logo_file_name.present? then%> -
- <%= image_tag("#{@organisation.logo_file_name}", class: "org_logo_admin_area" )%> -
- <%end%> - <% if @organisation.name.present? then%> + + <% if @organisation.logo.present? then%> + + <%end%> <%end%> <% if @organisation.abbreviation.present? then%> @@ -34,13 +31,7 @@ <%end%> - <% if @organisation.description.present? then%> - - - - - <%end%> - <% if @organisation.banner_text.present? then%> + <% if @organisation.banner_text.present? then%> @@ -52,6 +43,12 @@ <%end%> + <% if @organisation.contact_email.present? then%> + + + + + <%end%> <% if @organisation.organisation_type_id.present? then%> @@ -69,9 +66,10 @@
<%= t('org_admin.org_name') %> <%= @organisation.name %>
<%= @organisation.abbreviation %>
<%= t('org_admin.org_desc') %><%= raw @organisation.description %>
<%= t('org_admin.org_banner_text') %> <%= raw @organisation.banner_text %><%= @organisation.target_url %>
<%= t('org_admin.org_contact_email') %><%= @organisation.contact_email %>
<%= t('org_admin.org_type') %><%= l @organisation.updated_at.to_date, :formats => :short %>
- -
-
+ +
+
+
<%= link_to t("helpers.submit.edit"), admin_edit_organisation_path(current_user.organisation), :class => 'btn btn-primary'%>
diff --git a/app/views/plans/export.docx.caracal b/app/views/plans/export.docx.caracal index 2d3bfb2..e6b4fbb 100644 --- a/app/views/plans/export.docx.caracal +++ b/app/views/plans/export.docx.caracal @@ -249,4 +249,3 @@ docx.p end end - diff --git a/config/environments/development.rb b/config/environments/development.rb index a6fce0e..93edc60 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -26,8 +26,7 @@ # Asset digests allow you to set far-future HTTP expiration dates on all assets, # yet still be able to expire them through the digest params. - config.assets.digest = true - + config.assets.digest = false # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. diff --git a/config/locales/de.yml b/config/locales/de.yml index a58f1fe..4ff6706 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -107,6 +107,12 @@ user_text_html: "Folgend findet sich die Liste von Benutzern registriert bzgl. Ihrer Organisation. Sie können diese Liste bzgl. aller Felder sortieren." org_name: "Name" org_abbr: "Abkürzung" + org_logo_failed_message: "Logo Upload fehlgeschlagen." + org_logo: "Logo" + org_contact_email: "Kontakt Email" + org_contact_email_help_text: "Die E-Mail -Adresse des Administrators in Ihrer Organisation. Ihre Benutzer werden diese Adresse verwenden, wenn sie Fragen haben." + new_org_logo: "Laden Sie ein neues Logo-Datei" + remove_logo: "Wenn Sie die Standard DMPRoadmap Logo verwenden entscheiden , prüfen Sie bitte dieses Feld Ihre aktuelle Logo zu entfernen." org_desc: "Beschreibung" org_target_url: "Web-Seite" org_type: "Organisationsart" @@ -315,7 +321,7 @@ no_unlock_instructions: "Entsperrungsanleitungen nicht erhalten?" send_password_info: "Anleitung zum Zurücksetzen des Passworts" edit_password_info: "Zum Ändern Ihres Passworts folgende Felder ausfüllen." - accept_terms_html: "Ich akzeptiere die Nutzungsbedingungen *" + accept_terms_html: "Ich akzeptiere die Nutzungsbedingungen *" text_area: "Text area" text_field: "Textfeld" @@ -798,4 +804,4 @@
" footer: - terms_of_use: "

Universität Kiel, Kiel, SH, Deutschland
Nutzungsbedingungen

" + terms_of_use: "

Universität Kiel, Kiel, SH, Deutschland
Nutzungsbedingungen

" \ No newline at end of file diff --git a/config/locales/en-UK.yml b/config/locales/en-UK.yml index d1999ec..6d809eb 100644 --- a/config/locales/en-UK.yml +++ b/config/locales/en-UK.yml @@ -141,6 +141,8 @@ org_details_label: "Organisation details" org_text: "These are the basic details for your organisation." org_abbr_help_text_html: "This is what displays as a label on your guidance, e.g. 'Glasgow guidance on Metadata'. It's best to use an abbreviation or short name." + org_contact_email: "Contact Email" + org_contact_email_help_text: "The email address of an administrator at your organisation. Your users will use this address if they have questions." users_list: "List of users" user_full_name: "Name" user_name: "Email address" @@ -149,6 +151,10 @@ user_text_html: "Below is a list of users registered for your organisation. You can sort the data by each field." org_name: "Name" org_abbr: "Abbreviation" + org_logo_failed_message: "Logo Upload Failed." + org_logo: "Logo" + new_org_logo: "Upload a new logo file" + remove_logo: "If you decide to use the default DMPRoadmap logo, please check this box to remove your current logo." org_desc: "Description" org_banner_text: "Top banner text" org_target_url: "Website" @@ -363,7 +369,7 @@ no_unlock_instructions: "Didn't receive unlock instructions?" send_password_info: "Reset password instructions" edit_password_info: "If you would like to change your password please complete the following fields." - accept_terms_html: " I accept the terms and conditions *" + accept_terms_html: " I accept the terms and conditions *" you_must_accept: 'You must accept the terms and conditions to register.' email_already_registered: 'That email address is already registered.' email_must_valid_confirmation_message: "This must be a valid email address - a message will be sent to it for confirmation." diff --git a/config/locales/en-US.yml b/config/locales/en-US.yml index f4e2bea..8f7d952 100644 --- a/config/locales/en-US.yml +++ b/config/locales/en-US.yml @@ -141,6 +141,12 @@ user_text_html: "Below is a list of users registered for your organization. You can sort the data by each field." org_name: "Name" org_abbr: "Abbreviation" + org_logo_failed_message: "Logo Upload Failed." + org_logo: "Logo" + org_contact_email: "Contact Email" + org_contact_email_help_text: "The email address of an administrator at your organization. Your users will use this address if they have questions." + new_org_logo: "Upload a new logo file" + remove_logo: "If you decide to use the default DMPRoadmap logo, please check this box to remove your current logo." org_desc: "Description" org_banner_text: "Top banner text" org_target_url: "Website" @@ -352,7 +358,7 @@ no_unlock_instructions: "Didn't receive unlock instructions?" send_password_info: "Reset password instructions" edit_password_info: "If you would like to change your password please complete the following fields." - accept_terms_html: " I accept the terms and conditions *" + accept_terms_html: " I accept the terms and conditions *" you_must_accept: 'You must accept the terms and conditions to register.' email_already_registered: 'That email address is already registered.' email_must_valid_confirmation_message: "This must be a valid email address - a message will be sent to it for confirmation." diff --git a/config/locales/fr.yml b/config/locales/fr.yml index e8a1178..4b6f19e 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -114,6 +114,12 @@ user_text_html: " Vous trouverez ci-dessous une liste des utilisateurs inscrits pour votre organisme. Vous pouvez trier les données par champ." org_name: "Nom" org_abbr: "Abréviation" + org_logo_failed_message: "Logo Échec de l'envoi." + org_logo: "Logo" + org_contact_email: "Contact Email" + org_contact_email_help_text: "L' adresse e-mail d'un administrateur dans votre organisation. Vos utilisateurs utiliseront cette adresse si elles ont des questions." + new_org_logo: "Ajouter un nouveau fichier de logo" + remove_logo: "Si vous décidez d'utiliser le logo de DMPRoadmap par défaut , s'il vous plaît cocher cette case pour supprimer votre logo actuel." org_desc: "Description" org_target_url: "Site Web" org_type: "Type d'organisme" @@ -319,7 +325,7 @@ no_unlock_instructions: "Vous n'avez pas reçu les directives de déverrouillage?" send_password_info: "Directives pour réinitialiser le mot de passe" edit_password_info: "Si vous souhaitez modifier votre mot de passe, veuillez remplir les champs suivants." - accept_terms_html: "J'accepte les conditions *" + accept_terms_html: "J'accepte les conditions *" text_area: "Zone de texte" text_field: "Case de saisie simple" @@ -784,4 +790,4 @@
-

En utilisant l'outil, vous comprenez et acceptez ces conditions.

" +

En utilisant l'outil, vous comprenez et acceptez ces conditions.

" \ No newline at end of file diff --git a/db/migrate/20160822130601_remove_description_from_organisation.rb b/db/migrate/20160822130601_remove_description_from_organisation.rb new file mode 100644 index 0000000..0761ad5 --- /dev/null +++ b/db/migrate/20160822130601_remove_description_from_organisation.rb @@ -0,0 +1,5 @@ +class RemoveDescriptionFromOrganisation < ActiveRecord::Migration + def change + remove_column :organisations, :description + end +end diff --git a/db/migrate/20160822130701_add_contact_email_to_organisation.rb b/db/migrate/20160822130701_add_contact_email_to_organisation.rb new file mode 100644 index 0000000..ae7cb3c --- /dev/null +++ b/db/migrate/20160822130701_add_contact_email_to_organisation.rb @@ -0,0 +1,5 @@ +class AddContactEmailToOrganisation < ActiveRecord::Migration + def change + add_column :organisations, :contact_email, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 6ba23f1..4c22ef6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,14 +10,14 @@ # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160805105941) do +ActiveRecord::Schema.define(version: 20160822130701) do create_table "answers", force: :cascade do |t| t.text "text", limit: 65535 t.integer "plan_id", limit: 4 t.integer "user_id", limit: 4 t.integer "question_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "answers_options", id: false, force: :cascade do |t| @@ -31,9 +31,9 @@ t.integer "user_id", limit: 4 t.integer "question_id", limit: 4 t.text "text", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "archived", limit: 1 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "archived" t.integer "plan_id", limit: 4 t.integer "archived_by", limit: 4 end @@ -41,13 +41,13 @@ create_table "dmptemplates", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.boolean "published", limit: 1 + t.boolean "published" t.integer "user_id", limit: 4 t.integer "organisation_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "locale", limit: 255 - t.boolean "is_default", limit: 1 + t.boolean "is_default" end create_table "dmptemplates_guidance_groups", id: false, force: :cascade do |t| @@ -59,8 +59,8 @@ t.integer "plan_id", limit: 4 t.integer "user_id", limit: 4 t.string "format", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "file_types", force: :cascade do |t| @@ -68,8 +68,8 @@ t.string "icon_name", limit: 255 t.integer "icon_size", limit: 4 t.string "icon_location", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "file_uploads", force: :cascade do |t| @@ -77,11 +77,11 @@ t.string "title", limit: 255 t.text "description", limit: 65535 t.integer "size", limit: 4 - t.boolean "published", limit: 1 + t.boolean "published" t.string "location", limit: 255 t.integer "file_type_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "friendly_id_slugs", force: :cascade do |t| @@ -98,10 +98,10 @@ create_table "guidance_groups", force: :cascade do |t| t.string "name", limit: 255 t.integer "organisation_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "optional_subset", limit: 1 - t.boolean "published", limit: 1 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "optional_subset" + t.boolean "published" end create_table "guidance_in_group", id: false, force: :cascade do |t| @@ -114,10 +114,10 @@ create_table "guidances", force: :cascade do |t| t.text "text", limit: 65535 t.integer "guidance_group_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "question_id", limit: 4 - t.boolean "published", limit: 1 + t.boolean "published" end create_table "languages", force: :cascade do |t| @@ -139,9 +139,9 @@ t.integer "question_id", limit: 4 t.string "text", limit: 255 t.integer "number", limit: 4 - t.boolean "is_default", limit: 1 - t.datetime "created_at" - t.datetime "updated_at" + t.boolean "is_default" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "org_token_permissions", force: :cascade do |t| @@ -154,28 +154,30 @@ create_table "organisation_types", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "organisations", force: :cascade do |t| t.string "name", limit: 255 t.string "abbreviation", limit: 255 - t.text "description", limit: 65535 t.string "target_url", limit: 255 t.integer "organisation_type_id", limit: 4 t.string "domain", limit: 255 t.string "wayfless_entity", limit: 255 t.integer "stylesheet_file_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "parent_id", limit: 4 - t.boolean "is_other", limit: 1 + t.boolean "is_other" t.string "sort_name", limit: 255 t.text "banner_text", limit: 65535 t.string "logo_file_name", limit: 255 t.integer "region_id", limit: 4 t.integer "language_id", limit: 4 + t.string "logo_uid", limit: 255 + t.string "logo_name", limit: 255 + t.string "contact_email", limit: 255 end create_table "phases", force: :cascade do |t| @@ -195,27 +197,27 @@ t.integer "user_id", limit: 4 t.integer "section_id", limit: 4 t.integer "plan_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "release_time" end create_table "plans", force: :cascade do |t| - t.boolean "locked", limit: 1 + t.boolean "locked" t.integer "project_id", limit: 4 t.integer "version_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "project_groups", force: :cascade do |t| - t.boolean "project_creator", limit: 1 - t.boolean "project_editor", limit: 1 + t.boolean "project_creator" + t.boolean "project_editor" t.integer "user_id", limit: 4 t.integer "project_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "project_administrator", limit: 1 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "project_administrator" end create_table "project_guidance", id: false, force: :cascade do |t| @@ -246,8 +248,8 @@ create_table "question_formats", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "questions", force: :cascade do |t| @@ -259,10 +261,10 @@ t.integer "dependency_id", limit: 4 t.text "dependency_text", limit: 65535 t.integer "section_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.integer "question_format_id", limit: 4 - t.boolean "option_comment_display", limit: 1, default: true + t.boolean "option_comment_display", default: true end create_table "questions_themes", id: false, force: :cascade do |t| @@ -301,9 +303,9 @@ t.integer "number", limit: 4 t.integer "version_id", limit: 4 t.integer "organisation_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "published", limit: 1 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "published" end create_table "settings", force: :cascade do |t| @@ -319,24 +321,24 @@ create_table "splash_logs", force: :cascade do |t| t.string "destination", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "suggested_answers", force: :cascade do |t| t.integer "question_id", limit: 4 t.integer "organisation_id", limit: 4 t.text "text", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "is_example", limit: 1 + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "is_example" end create_table "themes", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "locale", limit: 255 end @@ -363,22 +365,22 @@ create_table "user_role_types", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "user_statuses", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "user_types", force: :cascade do |t| t.string "name", limit: 255 t.text "description", limit: 65535 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end create_table "users", force: :cascade do |t| @@ -408,8 +410,7 @@ t.datetime "invitation_sent_at" t.datetime "invitation_accepted_at" t.string "other_organisation", limit: 255 - t.boolean "dmponline3", limit: 1 - t.boolean "accept_terms", limit: 1 + t.boolean "accept_terms" t.integer "organisation_id", limit: 4 t.string "api_token", limit: 255 t.integer "invited_by_id", limit: 4 @@ -432,11 +433,11 @@ create_table "versions", force: :cascade do |t| t.string "title", limit: 255 t.text "description", limit: 65535 - t.boolean "published", limit: 1 + t.boolean "published" t.integer "number", limit: 4 t.integer "phase_id", limit: 4 - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false end add_index "versions", ["phase_id"], name: "index_versions_on_phase_id", using: :btree diff --git a/db/seeds.rb b/db/seeds.rb index 1619ef0..37c7723 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -778,6 +778,3 @@ token_permission_type.save! end end - - - diff --git a/public/403.html b/public/403.html index 664f965..19bd2ca 100644 --- a/public/403.html +++ b/public/403.html @@ -2,7 +2,7 @@ -DMPonline +DMP Roadmap