mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Move sign-in flow layout to core
Closes SCI-2477.
This commit is contained in:
parent
c6cf5f1aab
commit
20ffa57583
2 changed files with 47 additions and 0 deletions
|
@ -334,6 +334,22 @@ a[data-toggle="tooltip"] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.navbar-sign-in-halt {
|
||||||
|
.navbar-header {
|
||||||
|
float: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign-in-halt-logout-button {
|
||||||
|
padding-top: 7px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sign-in-halt-container {
|
||||||
|
margin: 0;
|
||||||
|
padding: 70px 10px 50px 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-secondary {
|
.navbar-secondary {
|
||||||
-webkit-transition: all 0.5s ease;
|
-webkit-transition: all 0.5s ease;
|
||||||
-moz-transition: all 0.5s ease;
|
-moz-transition: all 0.5s ease;
|
||||||
|
|
31
app/views/layouts/sign_in_halt.html.erb
Normal file
31
app/views/layouts/sign_in_halt.html.erb
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<% # This layout should be used when sign in flow is halted (due to e.g. password expiry, %>
|
||||||
|
<% # or some similar halt in sign-in chain) %>
|
||||||
|
<% content_for :content do %>
|
||||||
|
<nav class="navbar navbar-default navbar-fixed-top navbar-sign-in-halt" id="main-nav">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<span class="navbar-brand" title="<% t('nav.label.scinote') %>">
|
||||||
|
<%= image_tag('/images/scinote_icon.jpg', id: 'logo') %>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="pull-right sign-in-halt-logout-button">
|
||||||
|
<%= link_to main_app.destroy_user_session_path, class: 'btn btn-default', method: :delete do %>
|
||||||
|
<%= t('nav.user.logout') %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<% if flash[:error]%>
|
||||||
|
<div class="alert alert-danger alert-dismissable alert-floating">
|
||||||
|
<div class="container">
|
||||||
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||||
|
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||||
|
<span><%= sanitize_input(flash[:error]) %></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="container sign-in-halt-container">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<%= render template: 'scinote/common/layouts/application' %>
|
Loading…
Reference in a new issue