user_filters = options_key(value, ::Filter.find(:all, :conditions => ['user_id=?', current_user.id]).sort_by(&:id))
shared_filters = options_key(value, ::Filter.find(:all, :conditions => ['(user_id<>? or user_id is null) and shared=?', current_user.id, true]).sort_by(&:id))
- select_tag definition.key(), option_group('My Filters', user_filters) + option_group('Shared Filters', shared_filters)
+ filters_combo = select_tag definition.key(), option_group('My Filters', user_filters) + option_group('Shared Filters', shared_filters)
+ filter_link = link_to message('widget.filter.edit'), {:controller => :filters, :action => :manage}, :class => 'link-action'
- else
+ filters_combo + filter_link
+
+ else
hidden_field_tag definition.key()
end
end
<td class="form-key-cell"><%= property_def.key() -%><%= "*" unless property_def.optional() -%></td>
<td class="form-val-cell" id="row_<%= property_def.key() -%>">
<%= property_value_field(property_def, widget.property_text_value(property_def.key())) -%>
- <% if property_def.key() == 'filter' %>
- <%= link_to message('widget.filter.edit'), {:controller => :filters, :action => :manage}, :class => 'link-action' %>
- <% end %>
<div class="form-val-note">
<%= message("widget." + widget.key + ".param." + property_def.key(), :default => property_def.description()) -%>
</div>