lib/sidekiq/belt/ent/periodic_pause.rb in sidekiq-belt-0.3.0 vs lib/sidekiq/belt/ent/periodic_pause.rb in sidekiq-belt-0.3.1
- old
+ new
@@ -20,24 +20,36 @@
module SidekiqLoopsPeriodicPause
PAUSE_BUTTON = <<~ERB
<form action="<%= root_path %>loops/<%= loup.lid %>/pause" method="post">
<%= csrf_tag %>
- <input class="btn btn-danger" type="submit" name="pause" value="<%= t('Pause') %>"
+ <input class="btn btn-danger btn-pause" type="submit" name="pause" value="<%= t('Pause') %>"
data-confirm="Pause the job <%= loup.klass %>? <%= t('AreYouSure') %>" />
</form>
ERB
UNPAUSE_BUTTON = <<~ERB
<form action="<%= root_path %>loops/<%= loup.lid %>/unpause" method="post">
<%= csrf_tag %>
- <input class="btn btn-danger" type="submit" name="pause" value="<%= t('Unpause') %>"
+ <input class="btn btn-danger btn-unpause" type="submit" name="pause" value="<%= t('Unpause') %>"
data-confirm="Unpause the job <%= loup.klass %>? <%= t('AreYouSure') %>" />
</form>
ERB
def self.registered(app)
app.replace_content("/loops") do |content|
+ content.gsub!("</header>", "</header>
+ <style>
+ .btn-unpause {
+ color: #000;
+ background-image: none;
+ background-color: #ddd;
+ }
+ .btn-unpause:hover {
+ border: 1px solid;
+ }
+ </style>")
+
# Add the top of the table
content.gsub!("</th>\n </tr>", "</th><th><%= t('Pause/Unpause') %></th></th>\n </tr>")
# Add the run button
content.gsub!(