A corporation manager and dashboard for EVE Online
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

54 satır
2.3 KiB

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