Open amizhang opened 8 years ago
The simplest way is to add condition while get project name list:
Change _settings_project.html.erb, line 74
<%= select_tag("settings[exclude_projects]", options_from_collection_for_select(Project.active.where(:parent_id=>nil).order("name ASC"), :id, :name, Setting.plugin_project_overview[:exclude_projects]), { :multiple=> true, :style => "height: 300px;" }) %>
I just managed to run the plugin with open sub-projects, you can use the Rails gem activerecord-deprecated_finders as described in #19.
When a project has a subproject, the project_overview page can't be opened, the log show like:
ActionView::Template::Error (undefined method
shift' for #<Project::ActiveRecord_Relation:0x00000102a35cc0>): 23: <% end %> 24: 25: <tr class="po_project"> 26: <td title="<%= project_full_title(project) %>"><%= link_to project.name, project_path(project) %></td> 27: <% if Setting.plugin_project_overview[:stale_enable] %> 28: <td align="center"> 29: <% if project.archived? %> app/views/common/_tabs.html.erb:22:in
block in _app_views_commontabs_html_erb3504873109440660110_2220811220' app/views/common/_tabs.html.erb:21:ineach' app/views/common/_tabs.html.erb:21:in
_app_views_commontabs_html_erb3504873109440660110_2220811220' app/helpers/application_helper.rb:321:in `render_tabs'Found it this morning, still running on solutions.