Add two columns in one "My page" block

Added by Leo L almost 8 years ago

Hello,

I tried all day long, but I couldn't figured how to add two columns in the "Assigned to me" block.
These two columns are "Start date" and "Due date".
I noticed that there was something in the "app/views/issues/_list_simple.html.erb" file, but I don't know how to add such information to that table.

Somebody can help me there ? :)

--
Léo.

Replies (3)

RE: Add two columns in one "My page" block - Added by Christina Hustedde almost 8 years ago

I'm also interested in how to modify the content of the blocks on "My Page," but I haven't been able to find any relevant settings or any info on it. I did find a few other forum posts similar to yours, but also with no responses.

RE: Add two columns in one "My page" block - Added by Leo L almost 8 years ago

Hi Christina,

I didn't find yet how to do that.
I've read the developper documentation, but I've found nothing.

I'll keep looking around for it, because even if it's not critical, it would be great to add some informations to Redmine "My page" (and the existing plugins are unfortunately not available for Redmine 2.x).

--
Léo.

RE: Add two columns in one "My page" block - Added by Nick Nguyen almost 6 years ago

Hi, I know this is two years old, but it might still be relevant.

I needed to add the Due date to the Issues Assigned to me block. This is what I added to the _list_simple.html.erb. I am using Redmine 2.5.2, but it worked on our previous build of 1.2, so it should work across all revisions. You can do the same thing if you want to add start date. Just use field_start_date, issue.start_date in the appropriate places.

Add to the TH section. this will generate the header.
<th><%=l(:field_due_date)%></th>

Add below the last TD
<td class="due_date"><%=h issue.due_date %></td>.

So this is what it looks like altogether:

<% if issues && issues.any? %>
<%= form_tag({}) do %>
  <table class="list issues">
    <thead><tr>
    <th>#</th>
    <th><%=l(:field_project)%></th>
    <th><%=l(:field_tracker)%></th>
    <th><%=l(:field_subject)%></th>
    <th><%=l(:field_due_date)%></th>
    </tr></thead>
    <tbody>
    <% for issue in issues %>
    <tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
      <td class="id">
        <%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;', :id => nil) %>
        <%= link_to(issue.id, issue_path(issue)) %>
      </td>
      <td class="project"><%= link_to_project(issue.project) %></td>
      <td class="tracker"><%= issue.tracker %></td>
      <td class="subject">
        <%= link_to(issue.subject.truncate(60), issue_path(issue)) %> (<%= issue.status %>)
      </td>
      <td class="due_date"><%=h issue.due_date %></td>
    </tr>
    <% end %>
    </tbody>
  </table>
<% end %>
<% else %>
  <p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

(1-3/3)