Render general timeline columns

pull/913/head
Till Breuer 11 years ago
parent 498aa98bde
commit 075debb280
  1. 14
      app/assets/javascripts/angular/filters/column_filters.js
  2. 9
      public/templates/timelines/tree.html

@ -0,0 +1,14 @@
timelinesApp
.filter('getOptionColumn', function() {
var map = {
"type": "getTypeName",
"status": "getStatusName",
"responsible": "getResponsibleName",
"assigned_to": "getAssignedName",
"project": "getProjectName"
};
return function(nodeData, option) {
return nodeData[map[option]]();
};
});

@ -27,13 +27,10 @@
</span>
</td>
<!--
<td ng-repeat="option in timeline.options.columns">
(typeof availableRows[option] === 'function') && availableRows[option].call(node.payload, node.payload) || availableRows.general.call(node.payload, node.payload, option)
</td>
-->
<td ng-repeat="option in timeline.options.columns">
{{node[option]}}
<span class="tl-column">
{{node.payload | getOptionColumn:option}}
</span>
</td>
</tr>

Loading…
Cancel
Save