Project

General

Profile

« Previous | Next » 

Revision bb25ebe6

Added by Tomer Brisker about 8 years ago

Fixes #12979 - Create helper for "new" button

Previously the button classes were applied to new buttons using jQuery.
This commit creates a `new_link` helper that makes sure all new buttons
will receive the correct class and only display if authorized. Also a
little bit of cleanup.

View differences:

app/helpers/dashboard_helper.rb
end
link_to(icon_text("refresh"),
{:auto_refresh => (on == "on" ? "0" : "1")},
{ :'data-original-title' => tooltip, :rel => 'twipsy', :class => "#{on} auto-refresh btn btn-group"})
{ :'data-original-title' => tooltip, :rel => 'twipsy', :class => "#{on} auto-refresh btn btn-group btn-default"})
end
end

Also available in: Unified diff