mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Merge branch 'move_live_poll_btn_to_nav' into move_status_to_navbar_brand_area
This commit is contained in:
commit
ad8a4b78d5
4 changed files with 26 additions and 19 deletions
|
@ -113,10 +113,10 @@ header.row .pagination {
|
|||
margin-bottom: 10px;
|
||||
border-width: 0px;
|
||||
}
|
||||
.summary_bar #live-poll {
|
||||
line-height: 28px;
|
||||
.nav #live-poll {
|
||||
line-height: 25px;
|
||||
}
|
||||
.summary_bar #live-poll.active {
|
||||
#live-poll.active {
|
||||
background-color: #009300;
|
||||
}
|
||||
.summary_bar ul {
|
||||
|
|
|
@ -21,6 +21,15 @@
|
|||
<a href="<%= root_path %><%= url %>"><%= t(title) %></a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="nav pull-right">
|
||||
<li>
|
||||
<%= erb :_poll %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
14
web/views/_poll.erb
Normal file
14
web/views/_poll.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
<% if params[:poll] %>
|
||||
<script>
|
||||
setInterval("window.location.reload(true)", 2000);
|
||||
</script>
|
||||
<% end %>
|
||||
<% unless current_path == '' %>
|
||||
<div class="span2 pull-right actions">
|
||||
<% if params[:poll] %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary active" href="<%= root_path %><%= current_path %>"><%= t('StopPolling') %></a>
|
||||
<% else %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary" href="<%= root_path %><%= current_path %>?poll=true"><%= t('LivePoll') %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -7,11 +7,6 @@
|
|||
<link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
|
||||
<script type="text/javascript" src="<%= root_path %>javascripts/locales/jquery.timeago.<%= locale %>.js"></script>
|
||||
<% if params[:poll] %>
|
||||
<script>
|
||||
setInterval("window.location.reload(true)", 2000);
|
||||
</script>
|
||||
<% end %>
|
||||
</head>
|
||||
<body class="admin">
|
||||
<div class="navbar navbar-fixed-top">
|
||||
|
@ -22,17 +17,6 @@
|
|||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="span12 summary_bar">
|
||||
<div class="row">
|
||||
<% unless current_path == '' %>
|
||||
<div class="span2 pull-right actions">
|
||||
<% if params[:poll] %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary active" href="<%= root_path %><%= current_path %>"><%= t('StopPolling') %></a>
|
||||
<% else %>
|
||||
<a id="live-poll" class="btn btn-block btn-primary" href="<%= root_path %><%= current_path %>?poll=true"><%= t('LivePoll') %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= erb :_summary %>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue