diff --git a/app/views/branded/guidance_groups/admin_edit.html.erb b/app/views/branded/guidance_groups/admin_edit.html.erb new file mode 100644 index 0000000..26d90c9 --- /dev/null +++ b/app/views/branded/guidance_groups/admin_edit.html.erb @@ -0,0 +1,37 @@ +
+
+

<%= _('Guidance group') %>

+ <%= link_to _('View all guidance'), admin_index_guidance_path(current_user.org_id), class: 'btn btn-default pull-right' %> +
+
+ +
+
+ <%= form_for(@guidance_group, url: admin_update_guidance_group_path(@guidance_group), html: {method: :put, id: "admin_update_guidance_group_form" }) do |f| %> + +
+ <%= f.label _('Name'), for: :name, class: "control-label" %> + <%= f.text_field :name, as: :string, class: "form-control", 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %> +
+ +
+ <%= f.check_box :published, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %> + <%= f.label _('Published'), for: :published, class: "control-label" %> +
+ +
+ <%= f.check_box :optional_subset, 'data-toggle': 'tooltip', title: _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.") %> + <%= f.label _('Optional Subset'), for: :optional_subset, class: "control-label" %><%= _(' (e.g. School/ Department) ') %> +
+ +
+ <%= f.submit _('Save'), class: "btn btn-primary" %> + <% if @guidance_group.published == false then %> + <%= f.submit _('Publish'), name: "save_publish", class: "btn btn-primary" %> + <% end %> + <%= link_to _('Cancel'), admin_index_guidance_path, class: "btn btn-primary", role: 'button' %> +
+ <% end %> +
+
+ diff --git a/app/views/branded/guidance_groups/admin_new.html.erb b/app/views/branded/guidance_groups/admin_new.html.erb new file mode 100644 index 0000000..cd2610c --- /dev/null +++ b/app/views/branded/guidance_groups/admin_new.html.erb @@ -0,0 +1,33 @@ +
+
+

<%= _('Guidance group') %>

+ <%= link_to _('View all guidance'), admin_index_guidance_path(current_user.org_id), class: 'btn btn-default pull-right' %> +
+
+ +
+
+ <%= form_for :guidance_group, url: {action: "admin_create"}, id: 'admin_create_guidance_group_form' do |f| %> +
+ <%= f.label _('Name'), for: :name, class: "control-label" %> + <%= f.text_field :name, as: :string, class: "form-control", 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %> +
+ +
+ <%= f.check_box :published, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %> + <%= f.label _('Published'), for: :published, class: "control-label" %> +
+ +
+ <%= f.check_box :optional_subset, 'data-toggle': 'tooltip', title: _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.") %> + <%= f.label _('Optional Subset'), for: :optional_subset, class: "control-label" %><%= _(' (e.g. School/ Department) ') %> +
+ + +
+ <%= f.submit _('Save'), name: "draft", class: "btn btn-primary" %> + <%= link_to _('Cancel'), admin_index_guidance_path, class: "btn btn-primary", role: 'button' %> +
+ <% end %> +
+
\ No newline at end of file diff --git a/app/views/branded/guidances/admin_index.html.erb b/app/views/branded/guidances/admin_index.html.erb new file mode 100644 index 0000000..8bce990 --- /dev/null +++ b/app/views/branded/guidances/admin_index.html.erb @@ -0,0 +1,48 @@ +
+
+

<%= _('Guidance') %>

+ +

+ <%= _("First create a guidance group. This could be organisation wide or a subset e.g. a particular College / School, Institute or department. When you create guidance you'll be asked to assign it to a guidance group.") %> +

+
+
+ +
+
+

<%= _('Guidance group list') %>

+ + + <%= paginable_renderise( + partial: '/paginable/guidance_groups/index', + controller: 'paginable/guidance_groups', + action: 'index', + scope: @guidance_groups, + query_params: { sort_field: 'guidance_groups.name', sort_direction: :asc }) %> +
+ <%= _('Create a guidance group') %> +
+ +

<%= _('Guidance list') %>

+ +

+ <%= _('You can write pieces of guidance to be displayed by theme (e.g. generic guidance on storage and backup that should present across the board). Writing generic guidance by theme saves you time and effort as your advice will be automatically displayed across all templates rather than having to write guidance to accompany each.') %> +

+

+ <%= _('If you do have a need to provide guidance for specific funders that would not be useful to a wider audience (e.g. if you have specific instructions for applicants to BBSRC for example), you can do so by adding guidance to a specific question when you edit your template.') %> +

+ + + <%= paginable_renderise( + partial: '/paginable/guidances/index', + controller: 'paginable/guidances', + action: 'index', + scope: @guidances, + query_params: { sort_field: 'guidances.text', sort_direction: :asc }) %> + +
+ <%= _('Create guidance') %> +
+
+
+ diff --git a/app/views/branded/guidances/new_edit.html.erb b/app/views/branded/guidances/new_edit.html.erb new file mode 100644 index 0000000..f6b126a --- /dev/null +++ b/app/views/branded/guidances/new_edit.html.erb @@ -0,0 +1,31 @@ +<%# locals: { guidance, themes, guidance_groups, options } %> +
+
+

<%= _('Guidance') %>

+ <%= link_to _('View all guidance'), admin_index_guidance_path(current_user.org_id), class: 'btn btn-default pull-right' %> +
+
+
+
+ <%= form_for(guidance, url: options[:url], html: { method: options[:method] , id: 'new_edit_guidance'}) do |f| %> +
+ <%= f.label :text, class: 'control-label' %> + <%= text_area_tag("guidance-text", guidance.text, class: "tinymce form-control", 'aria-required': true, rows: 10) %> +
+ <%= render partial: 'org_admin/shared/theme_selector', + locals: { f: f, all_themes: themes, + popover_message: _('Select one or more themes that are relevant to this guidance. This will display your generic organisation-level guidance, as well as that from other sources e.g. the %{org_name} guidance or any Schools/Departments that you provide guidance for.') % { org_name: (current_user.org.abbreviation.present? ? current_user.org.abbreviation : current_user.org.name ) } } %> +
+ <%= f.label _('Guidance group'), for: :guidance_group_id, class: 'control-label' %> + <%= f.collection_select(:guidance_group_id, guidance_groups, + :id, :name, {prompt: false}, {multiple: false, 'data-toggle': 'tooltip', title: _('Select which group this guidance relates to.'), class: 'form-control', 'aria-required': true})%> +
+
+ <%= f.label :published, raw("#{f.check_box :published, as: :check_boxes, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for this guidance to appear on user's plans.")} #{_('Published?')}") %> +
+ + <%= f.submit _('Save'), name: "edit_guidance_submit", class: "btn btn-primary" %> + <%= link_to _('Cancel'), admin_index_guidance_path, class: "btn btn-primary", role: 'button' %> + <%end%> +
+
\ No newline at end of file diff --git a/app/views/branded/home/_welcome.html.erb b/app/views/branded/home/_welcome.html.erb new file mode 100644 index 0000000..5c548da --- /dev/null +++ b/app/views/branded/home/_welcome.html.erb @@ -0,0 +1,8 @@ +
+

<%= _('Welcome.')%>

+

+ <%= raw _('

%{application_name} helps you to create, review, and share data management plans that meet institutional and funder requirements. It has been jointly developed by the Digital Curation Centre (DCC) and the University of California Curation Center (UC3).') % {:application_name => Rails.configuration.branding[:application][:name], :organisation_name => Rails.configuration.branding[:organisation][:name]} %> + +

+ +
diff --git a/app/views/branded/layouts/_branding.html.erb b/app/views/branded/layouts/_branding.html.erb new file mode 100644 index 0000000..de9f779 --- /dev/null +++ b/app/views/branded/layouts/_branding.html.erb @@ -0,0 +1,110 @@ + diff --git a/app/views/branded/layouts/_footer.html.erb b/app/views/branded/layouts/_footer.html.erb new file mode 100644 index 0000000..5d90e76 --- /dev/null +++ b/app/views/branded/layouts/_footer.html.erb @@ -0,0 +1,31 @@ +<% + # Override the default Rails route helper for the contact_us page IF an alternate contact_us url was defined + # in the branding config file + contact_us = Rails.application.config.branding[:organisation][:contact_us_url] || contact_us_path +%> + + + diff --git a/app/views/branded/layouts/_navigation.html.erb b/app/views/branded/layouts/_navigation.html.erb new file mode 100644 index 0000000..43b4509 --- /dev/null +++ b/app/views/branded/layouts/_navigation.html.erb @@ -0,0 +1,70 @@ + + + diff --git a/app/views/branded/layouts/_signin_signout.html.erb b/app/views/branded/layouts/_signin_signout.html.erb new file mode 100644 index 0000000..08731fa --- /dev/null +++ b/app/views/branded/layouts/_signin_signout.html.erb @@ -0,0 +1,45 @@ + +<% if MANY_LANGUAGES %> + +<% end %> + + +<% if user_signed_in? %> + +<% else %> + <% if !isActivePage(root_path, true) %> +
  • + + + <%= _('Sign in') %> + +
  • + <% end %> +<% end %> diff --git a/app/views/branded/layouts/application.html.erb b/app/views/branded/layouts/application.html.erb new file mode 100644 index 0000000..fc67981 --- /dev/null +++ b/app/views/branded/layouts/application.html.erb @@ -0,0 +1,110 @@ + + + + + <%= _('%{application_name}') % { :application_name => Rails.configuration.branding[:application][:name] } %> + + <%= favicon_link_tag "favicon.png" %> + + + + + + + <%= stylesheet_link_tag fingerprinted_asset('application') %> + <%= javascript_include_tag fingerprinted_asset('vendor') %> + <%= javascript_include_tag fingerprinted_asset('application') %> + <%= csrf_meta_tags %> + + + + + + + +
    + <%= render partial: "layouts/header" %> +
    + + <% + has_alert = (alert || flash[:alert] || flash[:error]) + has_notice = (notice || flash[:notice]) + %> + + +
    +
    + + <%= has_alert ? _('Error:') : _('Notice:') %> + <%= raw (has_alert ? alert : notice) %> +
    + <%= yield %> +
    + + + + + <% + constants_json = { + PASSWORD_MIN_LENGTH: 8, + PASSWORD_MAX_LENGTH: 128, + MAX_NUMBER_ORG_URLS: 3, + MAX_NUMBER_GUIDANCE_SELECTIONS: 6, + + VALIDATION_MESSAGE_DEFAULT: _('Please enter a valid value.'), + VALIDATION_MESSAGE_EMAIL: _('You must enter a valid email address.'), + VALIDATION_MESSAGE_URL: _('You must enter a valid URL (e.g. https://organisation.org).'), + VALIDATION_MESSAGE_NUMBER: _('Please enter a valid number.'), + VALIDATION_MESSAGE_PASSWORD: _('The password must be between 8 and 128 characters.'), + VALIDATION_MESSAGE_PASSWORDS_MATCH: _('The passwords must match.'), + VALIDATION_MESSAGE_RADIO: _('Please choose one of the options.'), + VALIDATION_MESSAGE_CHECKBOX: _('Please check the box to continue.'), + VALIDATION_MESSAGE_SELECT: _('Please select a value from the list.'), + VALIDATION_MESSAGE_TEXT: _('This field is required.'), + + SHOW_PASSWORD_MESSAGE: _('Show password'), + SHOW_SELECT_ORG_MESSAGE: _('Select an organisation from the list.'), + SHOW_OTHER_ORG_MESSAGE: _('My organisation isn\'t listed'), + + PLAN_VISIBILITY_WHEN_TEST: _('N/A'), + PLAN_VISIBILITY_WHEN_NOT_TEST: _('Private'), + PLAN_VISIBILITY_WHEN_NOT_TEST_TOOLTIP: _('Private: restricted to me and people I invite.'), + + SHIBBOLETH_DISCOVERY_SERVICE_HIDE_LIST: _('Hide list.'), + SHIBBOLETH_DISCOVERY_SERVICE_SHOW_LIST: _('See the full list of partner institutions.'), + + NO_TEMPLATE_FOUND_ERROR: _('Unable to find a suitable template for the research organisation and funder you selected.'), + NEW_PLAN_DISABLED_TOOLTIP: _('Please select a research organisation and funder to continue.') + }.to_json + %> + + + + diff --git a/app/views/branded/org_admin/plans/index.html.erb b/app/views/branded/org_admin/plans/index.html.erb new file mode 100644 index 0000000..6133cdd --- /dev/null +++ b/app/views/branded/org_admin/plans/index.html.erb @@ -0,0 +1,46 @@ +
    +
    +

    <%= _('%{org_name} Plans') % { org_name: current_user.org.name } %>

    +
    +
    + +
    +
    + <% if @feedback_plans.length > 0 %> +

    <%= _('Notifications') %>

    +
    +
    + + + + + + + + + <% @feedback_plans.each do |notice| %> + + + + + + + + + <% end %> + +
    <%= _('Plan') %><%= _('Requestor') %><%= _('Type') %><%= _('Actions') %>
    <%= link_to notice.name, plan_path(notice) %><%= notice.owner.name(false) %><%= _('Feedback requested') %><%= link_to _('Complete'), feedback_complete_org_admin_plan_path(notice), 'data-toggle': 'tooltip', title: _('Notify the plan owner that I have finished providing feedback') %>
    +
    +
    + <% end %> + <% if @plans.length > 0 %> + <%= link_to _('Download plans'), org_admin_download_plans_path(format: :csv), target: '_blank', class: 'btn btn-default pull-right' %> + <%= paginable_renderise( + partial: '/paginable/plans/org_admin', + controller: 'paginable/plans', + action: 'org_admin', + scope: @plans, + query_params: { sort_field: 'plans.updated_at', sort_direction: :desc }) %> + <% end %> +
    +
    diff --git a/app/views/branded/org_admin/templates/_edit.html.erb b/app/views/branded/org_admin/templates/_edit.html.erb new file mode 100644 index 0000000..6041010 --- /dev/null +++ b/app/views/branded/org_admin/templates/_edit.html.erb @@ -0,0 +1,67 @@ +
    +
    + <% if template == current && template.customization_of.nil? %> + + <% end %> +
    +
    +
    +
    +
    + <%= render partial: "org_admin/templates/show_template", locals: { template: template, current: current, template_hash: template_hash }%> +
    +
    +
    +
    +
    + <% if template_hash[:template][:phases].present? && template_hash[:template][:phases].length > 1 %> + + <% end %> +
    +
    + +
    +
    +
    + + <% if template_hash[:template][:phases].present? %> + <% i = 0 %> + <% template_hash[:template][:phases].each do |phase_no, phase_hash| %> + <% phase = phase_hash[:data] %> +
    +
    + + +
    +
    " class="panel-collapse collapse<%= i == 0 ? 'in' : '' %>" role="tabpanel" aria-labelledby="<%= "headingPhase#{phase.id}" %>"<%= i == 0 ? 'aria-expanded="true"' : '' %>> +
    + <%= render partial: 'org_admin/templates/show_phases_sections', locals: { phase: phase, phase_hash: phase_hash, template: template, current: current } %> +
    +
    +
    + <% i += 1 %> + <% end %> + <% end %> +
    +
    +
    \ No newline at end of file diff --git a/app/views/branded/org_admin/templates/container.html.erb b/app/views/branded/org_admin/templates/container.html.erb new file mode 100644 index 0000000..d66cb5d --- /dev/null +++ b/app/views/branded/org_admin/templates/container.html.erb @@ -0,0 +1,22 @@ +<%= current_tab = '' unless current_tab.present? %> +
    +
    +

    <%= template.title %>

    + <%= link_to _('View all templates'), org_admin_templates_path(r: current_tab), class: 'btn btn-default pull-right' %> +
    +
    +
    +
    + + <%= render partial: "/org_admin/templates/admin_nav_tabs", locals: local_assigns %> +
    +
    +
    +
    + <%= render partial: partial_path, locals: local_assigns %> +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/branded/org_admin/templates/index.html.erb b/app/views/branded/org_admin/templates/index.html.erb new file mode 100644 index 0000000..dd12050 --- /dev/null +++ b/app/views/branded/org_admin/templates/index.html.erb @@ -0,0 +1,85 @@ +<% # locals: funder_templates, org_templates, current_user, current_org, orgs, current_tab %> +
    +
    +

    <%= _('Templates') %>

    +
    + <% if current_user.can_super_admin? %> +
    +

    <%= _('If you would like to modify one of the templates below, you must first change your organisation affiliation.') %>

    +
    +
    + <%= form_for current_user, url: org_swap_user_path(current_user), html: {method: :put, id: 'super-admin-switch-org'} do |f| %> + <%= render partial: "shared/my_org", locals: {f: f, default_org: current_org, orgs: orgs, allow_other_orgs: false} %> + <%= f.submit _('Change affiliation'), class: 'btn btn-default' %> + <% end %> +
    + <% end %> +
    +

    + <%= _('If you wish to add an organisational template for a Data Management Plan, use the \'create template\' button. You can create more than one template if desired e.g. one for researchers and one for PhD students. Your template will be presented to users within your organisation when no funder templates apply. If you want to add questions to funder templates use the \'customise template\' options below.') %> +

    +
    +
    +<% selected_tab = current_tab || (current_user.can_super_admin? ? 'all-templates' : 'organisation-templates') %> +
    +
    + + +
    + <% if current_user.can_super_admin? %> +
    +

    <%= _('All Templates') %>

    + <%= paginable_renderise( + partial: 'paginable/templates/all', + controller: 'paginable/templates', + action: 'all', + scope: all_templates, + query_params: { sort_field: 'templates.title', sort_direction: :asc }, + locals: {current_org: current_org.id, published: published, scopes: scopes[:all], hide_actions: true}) %> +
    + <% end %> +
    +

    <%= current_user.can_super_admin? ? _('%{org_name} Templates') % { org_name: current_user.org.name } : _('Own Templates') %>

    + <%= paginable_renderise( + partial: 'paginable/templates/orgs', + controller: 'paginable/templates', + action: 'orgs', + scope: own_templates, + query_params: { sort_field: 'templates.title', sort_direction: :asc }, + locals: {current_org: current_org.id, published: published, scopes: scopes[:orgs], hide_actions: false}) %> +
    + + <% if !current_org.funder_only? %> +
    +

    <%= _('Customizable Templates') %>

    + <%= paginable_renderise( + partial: 'paginable/templates/funders', + controller: 'paginable/templates', + action: 'funders', + scope: customizable_templates, + query_params: { sort_field: 'templates.title', sort_direction: :asc }, + locals: {current_org: current_org.id, customizations: customized_templates, published: published, scopes: scopes[:funders]}) %> +
    + <% end %> +
    + + + <%= _('Create a template') %> + +
    +
    \ No newline at end of file diff --git a/app/views/branded/orgs/admin_edit.html.erb b/app/views/branded/orgs/admin_edit.html.erb new file mode 100644 index 0000000..886e827 --- /dev/null +++ b/app/views/branded/orgs/admin_edit.html.erb @@ -0,0 +1,36 @@ +
    +
    +

    <%= org.id.present? ? _('Organisation details') : _('New organisation') %>

    + <% if current_user.can_super_admin? %> + <%= link_to _('View all organisations'), super_admin_orgs_path, class: 'btn btn-default pull-right' %> + <% end %> +
    +
    + +
    +
    + + +
    +
    + <%= render partial: 'orgs/profile_form', locals: local_assigns %> +
    + + <% if org.id.present? %> +
    + <%= render partial: 'orgs/feedback_form', locals: local_assigns %> +
    + <% end %> +
    +
    +
    + diff --git a/app/views/branded/super_admin/orgs/index.html.erb b/app/views/branded/super_admin/orgs/index.html.erb new file mode 100644 index 0000000..efe7867 --- /dev/null +++ b/app/views/branded/super_admin/orgs/index.html.erb @@ -0,0 +1,22 @@ +<%# Available locals: orgs %> +
    +
    +

    + <%= _('Organisations') %> + <%= _('Create Organisation') %> +

    +
    +
    +
    +
    + + <%= paginable_renderise( + partial: '/paginable/orgs/index', + controller: 'paginable/orgs', + action: 'index', + scope: orgs, + query_params: { sort_field: 'orgs.name', sort_direction: :asc }) %> +
    +
    +
    \ No newline at end of file diff --git a/app/views/branded/super_admin/themes/index.html.erb b/app/views/branded/super_admin/themes/index.html.erb new file mode 100644 index 0000000..bc59506 --- /dev/null +++ b/app/views/branded/super_admin/themes/index.html.erb @@ -0,0 +1,21 @@ +
    +
    +

    <%= _('Themes') %>

    +
    +
    +
    +
    +
    + <%= link_to(_('+ Add New Theme'), new_super_admin_theme_path, class: 'btn btn-default', role: 'button') %> +
    +
    + <%= paginable_renderise( + partial: '/paginable/themes/index', + controller: 'paginable/themes', + action: 'index', + scope: themes, + query_params: { sort_field: 'themes.title', sort_direction: :asc }) + %> +
    +
    +
    diff --git a/app/views/branded/super_admin/themes/new_edit.html.erb b/app/views/branded/super_admin/themes/new_edit.html.erb new file mode 100644 index 0000000..efe462f --- /dev/null +++ b/app/views/branded/super_admin/themes/new_edit.html.erb @@ -0,0 +1,38 @@ +<%# locals: { theme, options } %> +
    +
    +

    <%= options[:title] %>

    +
    +
    + +
    +
    + <%= form_for theme, url: options[:url], method: options[:method], html: { class: 'theme' } do |f| %> +
    + <%= f.label(:title, _('Title'), class: 'control-label') %> + <%= f.text_field(:title, + class: "form-control", + value: theme.title, + "aria-required": true) %> +
    +
    + <%= f.label(:description, _('Guidance')) %> + <%= f.text_area(:description, + class: "form-control", + rows: 10) %> +
    +
    + <%= f.button(_('Save'), class: "btn btn-default", type: "submit") %> + <%= link_to( + _('Delete'), + super_admin_theme_path(theme), + class: 'btn btn-default', + rel: 'nofollow', + 'data-method': 'delete', + 'data-confirm': _("Are you sure you want to delete the theme \"%{title}\"?") %{ :title => theme.title }) if options[:method] == :PUT %> + <%= link_to(_('Cancel'), super_admin_themes_path, class: 'btn btn-default', role: 'button') %> +
    + <% end %> +
    + +
    \ No newline at end of file diff --git a/app/views/branded/usage/index.html.erb b/app/views/branded/usage/index.html.erb new file mode 100644 index 0000000..5672350 --- /dev/null +++ b/app/views/branded/usage/index.html.erb @@ -0,0 +1,112 @@ +
    +
    +

    Usage statistics

    +

    <%= _('Use the filters to generate organisational usage statistics for a custom date range. The graphs display new users and plans for your organisation over the past year. You can download a CSV report for each graph.') %>

    +
    +
    +
    +
    +

    <%= _('Run your own filter') %>

    + <% if current_user.api_token.present? %> +
    + <%= hidden_field_tag('api_token', current_user.api_token) %> +
    +
    +
    + <%= label_tag('topic', _('Topic')) %> + <%= select_tag('topic', options_for_select( + [ + [_('Users'), 'users', { 'data-url': users_joined_api_v0_statistics_path }], + [_('Plans'), 'plans', { 'data-url': created_plans_api_v0_statistics_path }] + ]), class: 'form-control') %> +
    +
    +
    +
    + <%= label_tag('start_date', _('Start date')) %> + <%= date_field_tag('start_date', nil, class: 'form-control') %> +
    +
    +
    +
    + <%= label_tag('end_date', _('End date')) %> + <%= date_field_tag('end_date', nil, class: 'form-control') %> +
    +
    + <% if current_user.can_super_admin? %> +
    +
    + <%= label_tag(:org_id, _('Organisation')) %> + <%= select_tag(:org_id, options_from_collection_for_select(orgs, :id, :name, current_user.org_id), class: 'form-control') %> +
    +
    + <% else %> + <%= hidden_field_tag(:org_id, current_user.org_id) %> + <% end %> +
    + <%= submit_tag(_('Go'), class: 'btn btn-default') %> +
    +
    +
    + <% else %> +

    + <%= _('You don\'t have access to use the API. An api token is needed to generate usage statistics.') %> +

    + <% end %> +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    <%= _('New users') %>

    +

    <%= _('New plans') %>

    + +
    +
    +
    +
    +
    +
    +

    <%= _('Total users') %>

    +

    <%= _('Total plans') %>

    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    <%= _('No. users joined during last year') %>

    +
    +
    + +
    +
    + + +
    +
    +
    +

    <%= _('No. plans during last year') %>

    +
    +
    + +
    +
    + + +
    +
    \ No newline at end of file diff --git a/app/views/branded/users/admin_index.html.erb b/app/views/branded/users/admin_index.html.erb new file mode 100644 index 0000000..d212656 --- /dev/null +++ b/app/views/branded/users/admin_index.html.erb @@ -0,0 +1,21 @@ +
    +
    +

    <%= _('User accounts') %>

    +

    + <%= _('Below is a list of users registered for your organisation. You can sort the data by each field.')%> +

    +
    +
    + +
    +
    +
    + <%= paginable_renderise( + partial: '/paginable/users/index', + controller: 'paginable/users', + action: 'index', + scope: @users, + locals: { page: 1 }) %> +
    +
    +
    \ No newline at end of file diff --git a/lib/assets/images/favicon.ico b/lib/assets/images/favicon.ico deleted file mode 100644 index 4ddb00d..0000000 --- a/lib/assets/images/favicon.ico +++ /dev/null Binary files differ diff --git a/lib/assets/images/favicon.png b/lib/assets/images/favicon.png new file mode 100644 index 0000000..3851878 --- /dev/null +++ b/lib/assets/images/favicon.png Binary files differ diff --git a/lib/assets/images/logo.png b/lib/assets/images/logo.png index e4cc2dc..3f0e238 100644 --- a/lib/assets/images/logo.png +++ b/lib/assets/images/logo.png Binary files differ diff --git a/lib/assets/stylesheets/application.scss b/lib/assets/stylesheets/application.scss index d260a65..c880e94 100644 --- a/lib/assets/stylesheets/application.scss +++ b/lib/assets/stylesheets/application.scss @@ -5,6 +5,7 @@ @import "~font-awesome/scss/font-awesome"; @import "/overrides.scss"; +@import "/dmpopidor.scss"; [class^="bg-"] { padding: 15px; diff --git a/lib/assets/stylesheets/dmpopidor.scss b/lib/assets/stylesheets/dmpopidor.scss new file mode 100644 index 0000000..365a8d5 --- /dev/null +++ b/lib/assets/stylesheets/dmpopidor.scss @@ -0,0 +1,462 @@ +/* + DMPOPIDoR Stylesheet +*/ + +$dark-blue: #4891bd; +$blue: #51a2d2; +$light-blue: #92c5de; +$very-light-blue: #dcecf6; +$white: #fff; +$black: #000; +$rust: #d6604d; +$light-rust: #faefed; +$yellow: #FFCC00; +$light-yellow: #fff9e5; + +/* + MENU & FOOTER +*/ + +/* + MENU +*/ +#app-navbar { + + &.navbar-dmpopidor { + background-color: $white; + color: $blue; + } + border-bottom: 3px solid $rust; + .navbar-nav { + li { + a, a:active,a:focus,a:visited { + color: $blue; + } + a:hover { + color: $white; + background-color: $blue; + } + } + + li.active { + a, a:active,a:focus,a:visited { + color: $white; + background-color: $blue; + } + } + } + } + /* + FOOTER + */ +#footer-navbar { + &.navbar-dmpopidor { + background-color: $blue; + color: $white; + } + border-top: 3px solid $yellow; + .navbar-nav { + li { + a, a:active,a:focus,a:visited { + color: $white; + } + a:hover { + color: $white; + background-color: $blue; + } + } + } + } + + +/* + DROPDOWNS +*/ +#change-language, #signin-signout, #app-navbar-menu { + + .dmpopidor-dropdown { + background-color: $white; + li { + a, a:active,a:focus,a:visited { + color: $blue; + font-weight: bold; + + } + a:hover { + color: $white; + background-color: $light-blue; + } + } + li.active { + a, a:active,a:focus,a:visited { + background-color: $white; + color: $blue; + } + } + } + .open { + a { + background-color: $white; + } + } +} +#admin-dropdown { + .dmpopidor-dropdown { + li.active { + a, a:active,a:focus,a:visited { + background-color: $rust; + color: $white; + } + } + } +} + + +/* + MAIN CONTENT +*/ + +.dmpopidor-branding { + /* + PUBLIC AREA + */ + h1, + h2 { + color: $dark-blue; + } + + a { + color: $blue; + } + /* + TABLES + */ + .table { + border: 1px solid $blue; + // Cells borders + thead > tr > th, + tbody > tr > th, + tfoot > tr > th, + thead > tr > td, + tbody > tr > td, + tfoot > tr > td { + border: 1px solid $blue; + } + // Cells hovering + &.table-hover tbody tr:hover td, + &.table-hover tbody tr:hover th { + background-color: $very-light-blue; + } + // Header cells background + thead > tr > th { + background-color: $blue; + } + thead > tr > th:not(:last-child) { + border-right: 1px solid $white; + } + + .navbar-nav { + a{ + color: $white; + } + } + } + /* + BUTTONS + */ + .btn-primary, + .btn-primary:hover, + .btn-primary:focus, + .btn-primary:active, + .btn-primary:visited, + .btn-primary:active:hover, + .btn-primary.active:hover { + border-color: $rust; + background-color: $rust; + color: $white; + } + .btn-default, + .btn-default:hover, + .btn-default:focus, + .btn-default:active, + .btn-default:visited, + .btn-default:active:hover, + .btn-default.active:hover { + border-color: $rust; + background-color: $rust; + color: $white; + } + .combobox-clear-button, + .combobox-clear-button:hover, + .combobox-clear-button:focus { + color: $blue; + } + .btn-link { + color: $dark-blue; + } + /* + PLAN EDIT + */ + // Progress bar + .progress-bar { + background-color: $dark-blue; + } + // Tabs + .nav-tabs { + background-color: $blue; + + li > a { + color: $white + } + + li > a:hover, + li > a:focus, + li.active > a, + li.active > a:focus, + li.active > a:hover { + color: $blue; + border: 1px solid $blue; + border-bottom-color: transparent; + } + } + .nav-pills { + background-color: $blue; + + li > a { + color: $white + } + + li > a:hover, + li > a:focus, + li.active > a, + li.active > a:focus, + li.active > a:hover { + color: $blue; + border: 1px solid $blue; + } + } + // main border + .panel-default { + border-color: $blue; + } + // Sections + .heading-button > .panel-heading, + .panel-default > .panel-heading { + background-color: $blue; + } + + // Guidances + .panel-title { + color: $white; + } + + + + + + /* + ADMIN AREA + */ + .org-admin { + h1, + h2 { + color: $rust; + } + + a { + color: $rust; + } + + /* + TABLES + */ + .table { + border: 1px solid $rust; + // Cells borders + thead > tr > th, + tbody > tr > th, + tfoot > tr > th, + thead > tr > td, + tbody > tr > td, + tfoot > tr > td { + border: 1px solid $rust; + } + // Cells hovering + &.table-hover tbody tr:hover td, + &.table-hover tbody tr:hover th { + background-color: $light-rust; + } + // Header cells background + thead > tr > th { + background-color: $rust; + } + + .navbar-nav { + a:hover, + a:focus { + color: $rust; + background-color: $white; + } + } + } + + /* + BUTTONS + */ + .btn-primary, + .btn-primary:hover, + .btn-primary:focus, + .btn-primary:active, + .btn-primary:visited, + .btn-primary:active:hover, + .btn-primary.active:hover { + border-color: $blue; + background-color: $blue; + color: $white; + } + .btn-default, + .btn-default:hover, + .btn-default:focus, + .btn-default:active, + .btn-default:visited, + .btn-default:active:hover, + .btn-default.active:hover { + border-color: $blue; + background-color: $blue; + color: $white; + } + .combobox-clear-button, + .combobox-clear-button:hover, + .combobox-clear-button:focus { + color: $rust; + } + + // Tabs + .nav-tabs { + background-color: $rust; + + li > a:hover, + li > a:focus, + li.active > a, + li.active > a:focus, + li.active > a:hover { + color: $rust; + border: 1px solid $rust; + border-bottom-color: transparent; + } + } + .nav-pills { + background-color: $rust; + + li > a:hover, + li > a:focus, + li.active > a, + li.active > a:focus, + li.active > a:hover { + color: $rust; + border: 1px solid $rust; + } + } + + // main border + .panel-default { + border-color: $rust; + } + // Sections & Phases + .heading-button > .panel-heading, + .panel-default > .panel-heading { + background-color: $rust; + } + + + + } + + + + + + + /* + SUPER ADMIN + */ + .super-admin { + h1, + h2 { + color: $black; + } + + a { + color: $black; + text-decoration: underline; + } + + /* + TABLES + */ + .table { + border: 1px solid $yellow; + // Cells borders + thead > tr > th, + tbody > tr > th, + tfoot > tr > th, + thead > tr > td, + tbody > tr > td, + tfoot > tr > td { + border: 1px solid $yellow; + } + // Cells hovering + &.table-hover tbody tr:hover td, + &.table-hover tbody tr:hover th { + background-color: $light-yellow; + } + // Header cells background + thead > tr > th { + background-color: $yellow; + color: $black; + } + + } + + /* + BUTTONS + */ + .btn-primary, + .btn-primary:hover, + .btn-primary:focus, + .btn-primary:active, + .btn-primary:visited, + .btn-primary:active:hover, + .btn-primary.active:hover { + border-color: $yellow; + background-color: $yellow; + color: $black; + text-decoration: none; + } + .btn-default, + .btn-default:hover, + .btn-default:focus, + .btn-default:active, + .btn-default:visited, + .btn-default:active:hover, + .btn-default.active:hover { + border-color: $yellow; + background-color: $yellow; + color: $black; + text-decoration: none; + } + .combobox-clear-button, + .combobox-clear-button:hover, + .combobox-clear-button:focus { + color: $yellow; + } + + + .btn-link { + color: $black; + text-decoration: underline; + } + + } + +} \ No newline at end of file