Created
July 14, 2011 17:10
-
-
Save clyfe/1082905 to your computer and use it in GitHub Desktop.
ActionLinks#member should also include nested columns links
This file contains hidden or 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
<%# custom view for reporting %> | |
<% | |
record = list_record_report if list_record_report # compat with render :partial :collection | |
columns ||= list_columns | |
tr_class = cycle("", "even-record") | |
tr_class += " #{list_row_class(record)}" if respond_to? :list_row_class | |
url_options = params_for(:action => :list, :id => record.id) | |
# TODO: refactor, pull to Volker | |
# action_links ||= active_scaffold_config.action_links.member | |
action_links = active_scaffold_config.columns.select{|c| c.link.present?}.map(&:link) | |
def action_links.member; self end | |
-%> | |
<tr class="record <%= tr_class %>" id="<%= element_row_id(:action => :list, :id => record.id) %>" data-refresh="<%= url_for(params_for(:action => :row, :id => record.id, :_method => :get, :escape => false)).html_safe %>"> | |
<%= render :partial => 'list_record_columns', :locals => {:record => record, :columns => columns} %> | |
<%= render_nested_view(action_links, url_options, record) unless @nested_auto_open.nil? %> | |
</tr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment