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.

operation.mako 1.8 KiB

7 vuotta sitten
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.support.maketitle(operation["title"], campaign["title"], "Campaigns")}
  8. </%block>
  9. <%block name="extracss">
  10. ${self.support.makecss("campaigns.css")}
  11. </%block>
  12. <%block name="extrajs">
  13. ${self.support.makejs("campaigns.js")}
  14. </%block>
  15. <div class="breadcrumb">
  16. Campaign: <a href="${url_for('.campaign', name=cname)}">${campaign["title"] | h}</a>
  17. </div>
  18. <h2>
  19. <span class="understate">Operation:</span>
  20. <span${"" if enabled else ' class="disabled"'}>${operation["title"] | h}</span>
  21. % if not enabled:
  22. <abbr class="disabled-info" title="Operation inactive">&#10008;</abbr>
  23. % endif
  24. </h2>
  25. <div class="operation detail">
  26. <%
  27. mod = g.config.modules.campaigns
  28. primary, secondary = mod.get_overview(cname, opname)
  29. summary, renderer = mod.get_summary(cname, opname, limit=-1)
  30. klass = "big" if primary < 1000 else "medium" if primary < 1000000 else "small"
  31. punit = mod.get_unit(operation, primary)
  32. sunit = mod.get_unit(operation, secondary, primary=False)
  33. %>
  34. <div class="overview">
  35. <div class="primary">
  36. <span class="num ${klass}">${"{:,}".format(primary)}</span>
  37. <div class="unit">${punit}</div>
  38. </div>
  39. % if secondary is not None:
  40. <div class="secondary">
  41. <abbr title="${"{:,.2f}".format(secondary)} ${sunit}">
  42. <span class="num">${format_isk(secondary) | h}</span>
  43. <span class="unit">${sunit}</span>
  44. </abbr>
  45. </div>
  46. % endif
  47. </div>
  48. % if summary:
  49. <div class="summary">
  50. ${render_summary(renderer, summary, detail=True)}
  51. </div>
  52. % endif
  53. </div>