I'm trying to modify the UI of a Redmine installation (Redmine 0.7.3.devel.2093 (MySQL)).
When you view a project in Redmine, it generates a list of all the subprojects for the project.
For example, app/views/projects/index.rhtml calls the link_to function:
<% if @project_tree[project].any? %>
<p><%= l(:label_subproject_plural) %>:
<%= @project_tree[project].sort.collect {|subproject|
link_to(h(subproject.name), {:action => 'show', :id => subproject}, :class => (User.current.member_of?(subproject) ? "subp fav" : "subp"))}.join(', ') %></p>
<% end %>
Which outputs the following HTML:
<p>Subprojects:
<a href="/projects/show/foo" class="subp fav">Foo Subproject</a>, <a href="/projects/show/bar" class="subp">Bar Subproject</a>, <a href="/projects/show/baz" class="subp fav">Baz Subproject</a></p>
We find that a comma-delimited list of subprojects is very difficult to visually parse. We'd like to have each subproject listed on its own line. (Any markup is fine -- UL, OL, or P tags on each link would be ideal, but a BR instead of a comma would be totally fine.)
What is the best way to make this change? I can't find where link_to
is defined in the app; grepping for def link_to(
and similar turns up nothing. I'm a UI type, so I don't really get how Rails deals with this stuff -- it doesn't seem to be defined in the view templates.