Settings should not be cached due to changing permissions and query states

pull/6827/head
jwollert 14 years ago
parent 7f5287f8cc
commit d5a28204ac
  1. 2
      lib/widget/controls/delete.rb
  2. 2
      lib/widget/controls/save.rb
  3. 2
      lib/widget/controls/save_as.rb

@ -1,4 +1,6 @@
class Widget::Controls::Delete < Widget::Base class Widget::Controls::Delete < Widget::Base
dont_cache!
def render def render
return "" if @query.new_record? or !@options[:can_delete] return "" if @query.new_record? or !@options[:can_delete]
button = link_to content_tag(:span, content_tag(:em, l(:button_delete), :class => "button-icon icon-delete")), "#", button = link_to content_tag(:span, content_tag(:em, l(:button_delete), :class => "button-icon icon-delete")), "#",

@ -1,4 +1,6 @@
class Widget::Controls::Save < Widget::Base class Widget::Controls::Save < Widget::Base
dont_cache!
def render def render
return "" if @query.new_record? or !@options[:can_save] return "" if @query.new_record? or !@options[:can_save]
write link_to content_tag(:span, content_tag(:em, l(:button_save)), :class => "button-icon icon-save"), {}, write link_to content_tag(:span, content_tag(:em, l(:button_save)), :class => "button-icon icon-save"), {},

@ -1,4 +1,6 @@
class Widget::Controls::SaveAs < Widget::Base class Widget::Controls::SaveAs < Widget::Base
dont_cache!
def render def render
if @query.new_record? if @query.new_record?
link_name = l(:button_save) link_name = l(:button_save)

Loading…
Cancel
Save