diff --git a/app/views/layouts/_branding.html.erb b/app/views/layouts/_branding.html.erb index 1870dc0..846b598 100644 --- a/app/views/layouts/_branding.html.erb +++ b/app/views/layouts/_branding.html.erb @@ -1,16 +1,97 @@ - -
- <% if user_signed_in? %> - <% if !current_user.org.nil? %> - - <% if current_user.org.banner_text.present? %> -
- - <%= raw current_user.org.banner_text %> - +
+ + diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 44cb3a6..c302cfc 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -1,18 +1,24 @@ - -
-
-
    + + - -
    -

    - <%= link_to( image_tag("dcc_logo.png", alt: 'Digital Curation Centre'), "http://www.dcc.ac.uk/", title: "Digital Curation Centre") %><%= link_to( image_tag("uc3_logo.jpg", class: "footer_logo", alt: 'University of California Curation Center'),"http://www.cdlib.org/uc3/", title: "University of California Curation Center", id: "footer_right_uc3", ) %> -

    diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index a0cb493..569a37c 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,25 +1,9 @@ -
    - <% if user_signed_in? && !current_user.org.nil? && current_user.org.logo.present? %> - - <% else %> - - <% end %> + -
    -
    -

    Placeholder text to help visual column layout

    - <%= render "layouts/branding" %> -
    - - -
    -
    - <%= render "layouts/signin_signout" %> +
    + <% if user_signed_in? && !current_user.org.nil? %> + <%= render partial: "layouts/branding" %> + <% end %>
    diff --git a/app/views/layouts/_navigation.html.erb b/app/views/layouts/_navigation.html.erb index 04d047e..0006037 100644 --- a/app/views/layouts/_navigation.html.erb +++ b/app/views/layouts/_navigation.html.erb @@ -1,84 +1,66 @@ -
    + -
  • - <%= link_to _('My Dashboard'), plans_path %> -
  • - - <% - if current_user.can_org_admin? && !current_user.org_id.nil? && !action_name.include?("admin_") - link = nil - - if current_user.can_modify_org_details? && current_user.org.abbreviation.blank? - link = admin_edit_org_path(current_user.org_id) - elsif current_user.can_modify_templates? - link = admin_index_template_path(current_user.org_id) - elsif current_user.can_modify_guidance? - link = admin_index_guidance_path(current_user.org_id) - elsif current_user.can_modify_org_details? - link = admin_edit_org_path(current_user.org_id) - elsif current_user.can_grant_permissions? - link = admin_index_users_path - end - end - %> - <% unless link.nil? %> -
  • - <%= link_to _('Admin'), link %> -
  • - <% end %> - <% end %> -
diff --git a/app/views/layouts/_signin_signout.html.erb b/app/views/layouts/_signin_signout.html.erb index 062ed85..22f189c 100644 --- a/app/views/layouts/_signin_signout.html.erb +++ b/app/views/layouts/_signin_signout.html.erb @@ -1,34 +1,48 @@ + +<% if MANY_LANGUAGES %> + +<% end %> + <% if user_signed_in? %> - - <%= _('Signed in as') %> <%= current_user.name(false) %> - - | - - <%= link_to _('Logout'), destroy_user_session_path, method: :delete, class: "left-indent right-indent" %> - | - + <% else %> <% if !isActivePage(root_path) %> - - | +
  • + + + <%= _('Sign in') %> + +
  • + <%= render partial: 'shared/login_form', layout: 'shared/modal', locals: { id: "header-signin", title: _('Sign in')} %> + <% end %> <% end %> - -<% if MANY_LANGUAGES %> - - - <%= _('Choose your language') %> - - -<% end %> - -<% if !user_signed_in? && !isActivePage(root_path) then %> - <%= render partial: 'shared/login_form', layout: 'shared/modal', locals: { id: "header-signin", title: _('Sign in') } %> -<% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index bc4213e..7c33b7d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,6 @@ - + <%= _('%{application_name}') % { :application_name => Rails.configuration.branding[:application][:name] } %> @@ -8,13 +9,13 @@ <!--[ if lte IE 9]> <script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"></script> - <style type="text/css"> - .navbar { - filter:none !important; - } - </style> + <style type="text/css"> + .navbar { + filter:none !important; + } + </style> <![endif]--> - + <!--[if gte IE 9]> <style type="text/css"> .gradient { @@ -24,9 +25,9 @@ <![endif]--> <%= stylesheet_link_tag "application" %> - + <%= javascript_include_tag "application"%> - + <script> // Set the JS locale equal to the one Rails has I18n.defaultLocale = "<%= I18n.default_locale %>"; @@ -39,9 +40,9 @@ // Invoke the plugin $('input, textarea').placeholder(); $('input, iframe').placeholder(); - }); + }); </script> - <![endif]--> + <![endif]--> <%= yield(:head) %> <%= csrf_meta_tags %> @@ -49,44 +50,45 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - + </head> - <body> + <body style="margin-bottom:75px;"> <!--p class="alert alert-danger">The DMPRoadmap service will be down from 1600 BST (UTC+1) on Friday, 15th May 2015 to allow essential updates. Please ensure you have saved your data and logged out before this time to avoid any problems. We will be back again as soon as possible on Friday evening.</p--> <!--p class="alert alert-success">Our essential updates have been completed, and DMPRoadmap is up and running again. Many thanks for your patience.</p --> - <div class="container"> - <!-- header renedering --> - <header class="row"> - <%= render "layouts/header" %> + <header> + <%= render partial: "layouts/header" %> </header> - <% + <% has_alert = (alert || flash[:alert] || flash[:error]) has_notice = (notice || flash[:notice]) %> - <div id="notification-area" - class="roadmap-<%= has_alert ? 'alert' : 'info' %>-box" - style="visibility: <%= (has_alert || has_notice) ? 'visible' : 'hidden' %>;"<%= (has_notice ? ' role=status' : (has_alert ? ' role=alert' : '')) %>> - <i class="fa <%= has_alert ? ' fa-times-circle' : ' fa-check-circle' %>" aria-hidden="true"></i> - <span class="aria-only"><%= has_alert ? _('Error:') : _('Notice:') %></span> - <span><%= raw (has_alert ? alert : notice) %></span> - </div> - - <main> + <main class="container" style="<% if !user_signed_in? or current_user.org.nil? %>padding-top:75px;<% end %>"> + <div id="notification-area" + class="roadmap-<%= has_alert ? 'alert' : 'info' %>-box" + style="visibility: <%= (has_alert || has_notice) ? 'visible' : 'hidden' %>;"<%= (has_notice ? ' role=status' : (has_alert ? ' role=alert' : '')) %>> + <i class="fa <%= has_alert ? ' fa-times-circle' : ' fa-check-circle' %>" aria-hidden="true"></i> + <span class="aria-only"><%= has_alert ? _('Error:') : _('Notice:') %></span> + <span><%= raw (has_alert ? alert : notice) %></span> + </div> <%= yield %> </main> <!-- footer rendering --> - <footer class="row"> + <footer > <%= render "layouts/footer" %> </footer> + + <!-- Navbar triggered modals need to be outside of every other element at the top level of <body> --> + + <script> /* Initialises an editor for each textarea whose class name is tinymce */ dmproadmap.utils.tinymce.init({ selector: '.tinymce' }); </script> - </div> + </body> </html> diff --git a/app/views/shared/_login_form.html.erb b/app/views/shared/_login_form.html.erb index fb56a41..e080c2a 100644 --- a/app/views/shared/_login_form.html.erb +++ b/app/views/shared/_login_form.html.erb @@ -12,42 +12,42 @@ <a href="<%= target %>" class="link-as-button omniauth-login"><%= _('Your Institution') %></a> <%else%> <%= f.hidden_field :shibboleth_id, :value => session[:shibboleth_data][:uid] %> - <%end%> + <%end%> </span> </div> - + <h3 class="centered small-header">- <%= _('or') %> -</h3> <% end %> - - + + <!-- Login form email address --> <div class="form-input"> <%= f.label(:email, _('Email'), class: 'required') %> <%= f.email_field(:email, class: 'left-indent required') %> <span role="" id="email_error" class="error-tooltip left-indent"></span> - + <div class="form-input checkbox-right"> <%= f.label :remember_me, _('Remember email'), class: "remember_div checkbox-label" %> <%= f.check_box :remember_me %> </div> </div> - + <!-- Login form password --> <div class="form-input"> <%= f.label(:password, _('Password'), class: 'required') %> <%= f.password_field(:password, class: 'left-indent required') %> <span role="" id="password_error" class="error-tooltip left-indent"></span> - + <div class="form-input checkbox-right"> <%= label_tag(:password_show, _('Show password'), class: 'checkbox-label') %> <%= check_box_tag(:password_show, "1", false) %> </div> </div> - + <div class="form-input top-indent"> <%= render partial: 'shared/accessible_submit_button', - locals: {id: 'sign-in-button', - val: _('Sign In'), + locals: {id: 'sign-in-button', + val: _('Sign In'), disabled_initially: true, classes: 'small-input-button left-indent', tooltip: _('Enter your email and password.')} %> @@ -57,4 +57,4 @@ </div> </div> </fieldset> -<% end %> \ No newline at end of file +<% end %> diff --git a/lib/assets/stylesheets/dmproadmap.scss b/lib/assets/stylesheets/dmproadmap.scss index 0ca9017..e93ebeb 100644 --- a/lib/assets/stylesheets/dmproadmap.scss +++ b/lib/assets/stylesheets/dmproadmap.scss @@ -1,11 +1,12 @@ /**** font configuration ****/ -/* + @font-face { font-family: 'GillSansLight'; src: font-url('GillSansLight.ttf') format('truetype'); font-weight: normal; } +/* $black: #000; $white: #FFF; $highlight-color: $black; @@ -36,11 +37,66 @@ $header-logo-width: 165px; $header-background: $white; $header-text-color: $black; +$header-background: linear-gradient(#ED6406, #F59503); */ -/* $header-background: linear-gradient(#ED6406, #F59503); */ + +#main-navbar { + border-radius: 0px; + height: 50px; +} + +#org-navbar { + border-radius: 0px; + margin-top: -20px; + height: 100px; +} + +@media (min-width: 768px) { + #navbar2 .navbar-nav li a { + line-height: 100px; + height: 100px; + padding-top: 0; + } +} + +@media (min-width: 768px) { + #admin-dropdown ul li a, #super-admin-dropdown ul li a { + line-height: 26px !important; + height: 26px !important; + margin-top: 3px !important; + } +} + +.inverse-dropdown { + background-color: #222 !important; + border-color: #080808 !important; + & > li > a { + color: #999 !important; + &:hover { + color: #fff !important; + background-color: #000 !important; + } + } + .active a { + color: #fff !important; + background-color: #000 !important; + } +} + +/* FOOTER STYLING */ + #footer-navbar { + margin-bottom: 0px; + position: absolute; + bottom: 0; + width: 100%; + border-radius:0px; + ul { + padding-right:15px; + } + } /* HEADER LOGO POSITIONING */ /* $header-logo-top-margin: 20px; $header-logo-left-margin: 10px; -*/ \ No newline at end of file +*/