A corporation manager and dashboard for EVE Online
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

campaign.mako 2.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. <% klass = "loose" if len(section) < 3 else "tight" %>
  20. <section class="${klass}">
  21. % for opname in section:
  22. <%
  23. operation = campaign["operations"][opname]
  24. primary, secondary = mod.get_overview(name, opname)
  25. summary, renderer = mod.get_summary(name, opname, limit=5)
  26. klass = "big" if primary < 1000 else "medium" if primary < 1000000 else "small"
  27. punit = mod.get_unit(operation, primary)
  28. sunit = mod.get_unit(operation, secondary, primary=False)
  29. %>
  30. <div class="operation">
  31. <h3>
  32. <a href="${url_for('campaigns.operation', cname=name, opname=opname)}">${operation["title"] | h}</a>
  33. </h3>
  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)}
  51. </div>
  52. % endif
  53. </div>
  54. % endfor
  55. </section>
  56. % endfor
  57. </div>