A corporation manager and dashboard for EVE Online
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 

63 lignes
2.5 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.support.maketitle(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. <h2>
  16. <span class="understate">Campaign:</span>
  17. <span${"" if enabled else ' class="disabled"'}>${campaign["title"] | h}</span>
  18. % if not enabled:
  19. <abbr class="disabled-info" title="Campaign inactive">&#10008;</abbr>
  20. % endif
  21. </h2>
  22. <% mod = g.config.modules.campaigns %>
  23. <div id="operations">
  24. % for section in campaign["layout"]:
  25. <section>
  26. % for opname in section:
  27. <%
  28. operation = campaign["operations"][opname]
  29. primary, secondary = mod.get_overview(name, opname)
  30. summary, renderer = mod.get_summary(name, opname, limit=5)
  31. klass = "big" if primary < 1000 else "medium" if primary < 1000000 else "small"
  32. punit = mod.get_unit(operation, primary)
  33. sunit = mod.get_unit(operation, secondary, primary=False)
  34. %>
  35. <div class="operation">
  36. <h3>
  37. <a href="${url_for('campaigns.operation', cname=name, opname=opname)}">${operation["title"] | h}</a>
  38. </h3>
  39. <div class="overview">
  40. <div class="primary">
  41. <span class="num ${klass}">${"{:,}".format(primary)}</span>
  42. <div class="unit">${punit}</div>
  43. </div>
  44. % if secondary is not None:
  45. <div class="secondary">
  46. <abbr title="${"{:,.2f}".format(secondary)} ${sunit}">
  47. <span class="num">${format_isk(secondary) | h}</span>
  48. <span class="unit">${sunit}</span>
  49. </abbr>
  50. </div>
  51. % endif
  52. </div>
  53. % if summary:
  54. <div class="summary">
  55. ${render_summary(renderer, summary)}
  56. </div>
  57. % endif
  58. </div>
  59. % endfor
  60. </section>
  61. % endfor
  62. </div>