forked from akiko-pusu/redmine_banner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
still not as it should be but feels better now
- Loading branch information
steffen.jurrack
committed
Sep 14, 2012
1 parent
21a16ef
commit 2e4a8c1
Showing
2 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,24 @@ | ||
#banner_area.banner_area | ||
#banner_content{:class=>"banner.banner_#{Setting.plugin_redmine_banner['type']}"} | ||
= textilizable Setting.plugin_redmine_banner['banner_description'] | ||
-if User.current.admin? && (params[:controller] != 'settings' && params[:action] != 'settings' && params[:id] != 'redmine_banner') | ||
#banner_edit | ||
= link_to l(:button_edit), {:controller => 'settings', :action => 'plugin', :id => 'redmine_banner'}, | ||
{:class => 'icon banner-icon-edit', :title => l(:button_edit)} | ||
%a.icon.banner-icon-off{:href=>"#", :onclick=>"", :title=>"#{l(:banner_off)}"}= l(:button_off) | ||
|
||
-if User.current.admin? && (params[:controller] != 'settings' && params[:action] != 'settings' && params[:id] != 'redmine_banner') | ||
#banner_edit | ||
= link_to l(:button_edit), {:controller => 'settings', :action => 'plugin', :id => 'redmine_banner'}, | ||
{:class => 'icon banner-icon-edit', :title => l(:button_edit)} | ||
|
||
%a.icon.banner-icon-off{:href=>"#", | ||
:onclick=>"if (confirm('#{l(:text_are_you_sure)}')) { new Ajax.Updater('banner_area', '#{url_for(:controller => :banner, :action => 'off', :moderate => 'yes')}',{asynchronous:true, evalScripts:true, parameters:'authenticity_token=' + encodeURIComponent('#{form_authenticity_token}')}); }; hideBanner(); return false;", | ||
:title=>"#{l(:banner_off)}"} | ||
= l(:button_off) | ||
:javascript | ||
function banner_off_moderate(){ | ||
if (confirm('#{l(:text_are_you_sure)}')) { | ||
new Ajax.Updater( | ||
'banner_area', | ||
'#{url_for(:controller => :banner, :action => 'off', :moderate => 'yes')}', | ||
{ asynchronous:true, | ||
evalScripts:true, | ||
parameters:'authenticity_token=' + encodeURIComponent('#{form_authenticity_token}') | ||
} | ||
); | ||
}; | ||
hideBanner(); | ||
return false; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters