A corporation manager and dashboard for EVE Online
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

57 lines
2.3 KiB

  1. <%!
  2. from calefaction.format import format_isk
  3. %>
  4. <%inherit file="../_default.mako"/>
  5. <%namespace file="renderers.mako" import="render_summary"/>
  6. <%block name="title">
  7. ${self.maketitle(campaign["title"], "Campaigns")}
  8. </%block>
  9. <h2>
  10. <span class="understate">Campaign:</span>
  11. <span${"" if enabled else ' class="disabled"'}>${campaign["title"] | h}</span>
  12. % if not enabled:
  13. <abbr class="disabled-info" title="Campaign inactive">&#10008;</abbr>
  14. % endif
  15. </h2>
  16. <% mod = g.config.modules.campaigns %>
  17. <div id="operations">
  18. % for section in campaign["layout"]:
  19. <section>
  20. % for opname in section:
  21. <%
  22. operation = campaign["operations"][opname]
  23. primary, secondary = mod.get_overview(name, opname)
  24. summary, renderer = mod.get_summary(name, opname, limit=5)
  25. klass = "big" if primary < 1000 else "medium" if primary < 1000000 else "small"
  26. punit = mod.get_unit(operation, primary)
  27. sunit = mod.get_unit(operation, secondary, primary=False)
  28. %>
  29. <div class="operation">
  30. <h3>
  31. <a href="${url_for('campaigns.operation', cname=name, opname=opname)}">${operation["title"] | h}</a>
  32. </h3>
  33. <div class="overview">
  34. <div class="primary">
  35. <span class="num ${klass}">${"{:,}".format(primary)}</span>
  36. <div class="unit">${punit}</div>
  37. </div>
  38. % if secondary is not None:
  39. <div class="secondary">
  40. <abbr title="${"{:,.2f}".format(secondary)} ${sunit}">
  41. <span class="num">${format_isk(secondary) | h}</span>
  42. <span class="unit">${sunit}</span>
  43. </abbr>
  44. </div>
  45. % endif
  46. </div>
  47. % if summary:
  48. <div class="summary">
  49. ${render_summary(renderer, summary)}
  50. </div>
  51. % endif
  52. </div>
  53. % endfor
  54. </section>
  55. % endfor
  56. </div>