dashboard.mak 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <%inherit file="local:templates.master"/>
  2. <%namespace name="POD" file="pod.templates.pod"/>
  3. <%def name="title()">
  4. pod :: your dashboard
  5. </%def>
  6. <div class="row">
  7. <div class="container-fluid">
  8. <div class="row-fluid">
  9. <div class="span6">
  10. ## LEFT PANEL OF THE DASHBOARD
  11. <div id='whats-hot-panel' class="well">
  12. ## WHAT'S HOT PANEL
  13. <h3><i class="fa fa-warning pod-red"></i> ${_("What's hot!")}</h3>
  14. % if len(whats_hot_nodes)<=0:
  15. <p>${_("No hot stuff for today.")}</p>
  16. % else:
  17. <ul>
  18. % for node in whats_hot_nodes:
  19. <li title="${node.data_label}">
  20. <i class="${node.getIconClass()}" title="${node.getUserFriendlyNodeType()}"></i>
  21. % if node.node_type=='data' or node.parent_id==None:
  22. <a href="${tg.url('/document/%i'%node.node_id)}">
  23. % else:
  24. <a href="${tg.url('/document/%i#tab-%ss'%(node.parent_id, node.node_type))}">
  25. % endif
  26. ${node.getTruncatedLabel(70)}
  27. </a>
  28. <span title="${_('last modification')}" class="pull-right label">
  29. ${node.getFormattedDateTime(node.updated_at)}
  30. </span>
  31. </li>
  32. % endfor
  33. </ul>
  34. % endif
  35. ## WHAT'S HOT PANEL [END]
  36. </div>
  37. <div id='action-to-do-documents-panel' class="well">
  38. ## DOCUMENTS REQUIRING ACTIONS PANEL
  39. <h3><i class="pod-blue fa fa-gears"></i> ${_("Actions to do")}</h3>
  40. % if len(action_to_do_nodes)<=0:
  41. <p>${_("No document requiring action.")}</p>
  42. % else:
  43. <ul>
  44. % for node in action_to_do_nodes:
  45. <li title="${node.data_label}">
  46. <i class="${node.getIconClass()}" title="${node.getUserFriendlyNodeType()}"></i>
  47. % if node.node_type=='data' or node.parent_id==None:
  48. <a href="${tg.url('/document/%i'%node.node_id)}">
  49. % else:
  50. <a href="${tg.url('/document/%i#tab-%ss'%(node.parent_id, node.node_type))}">
  51. % endif
  52. ${node.getTruncatedLabel(70)}
  53. </a>
  54. <span title="${_('last modification')}" class="pull-right label">
  55. ${node.getFormattedDateTime(node.updated_at)}
  56. </span>
  57. </li>
  58. % endfor
  59. </ul>
  60. % endif
  61. ## DOCUMENTS REQUIRING ACTIONS PANEL [END]
  62. </div>
  63. ## LEFT PANEL OF THE DASHBOARD [END]
  64. </div>
  65. <div class="span6">
  66. ## RIGHT PANEL OF THE DASHBOARD
  67. <div id='last-modified-documents-panel' class="well">
  68. <h3><i style="color: #999;" class="fa fa-clock-o"></i> ${_("Latest operations")}</h3>
  69. % if len(last_modified_nodes)<=0:
  70. <p>${_("No activity found")}</p>
  71. % else:
  72. <table class="table table-condensed table-hover">
  73. % for node in last_modified_nodes:
  74. <tr title="${node.data_label}">
  75. <td>${node.getFormattedDateTime(node.updated_at)}</td>
  76. <td title="${node.getUserFriendlyNodeType()}">
  77. <i class="${node.getIconClass()}"></i>
  78. </td>
  79. <td>
  80. % if node.node_type=='data' or node.parent_id==None:
  81. <a href="${tg.url('/document/%i'%node.node_id)}">
  82. % else:
  83. <a href="${tg.url('/document/%i#tab-%ss'%(node.parent_id, node.node_type))}">
  84. % endif
  85. ${node.getTruncatedLabel(35)}
  86. </a>
  87. </td>
  88. <td>
  89. % if node.updated_at==node.created_at:
  90. <span class="label label-success">${_("created")}</span>
  91. % else:
  92. <span class="label label-info">${_("updated")}</span>
  93. % endif
  94. </td>
  95. </tr>
  96. % endfor
  97. </table>
  98. % endif
  99. </div>
  100. ## RIGHT PANEL OF THE DASHBOARD [END]
  101. </div>
  102. </div>
  103. </div>
  104. </div>