A corporation manager and dashboard for EVE Online
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

59 linhas
2.1 KiB

  1. <%!
  2. from calefaction.format import format_isk, format_utctime
  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, sortby=sortby, 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, sortby=sortby)}
  51. </div>
  52. % endif
  53. </div>
  54. <div class="last-updated">
  55. <% last_updated, _ = g.campaign_db.check_operation(cname, opname) %>
  56. Last updated: <abbr title="${last_updated.strftime("%Y-%m-%d %H:%M:%S")}">${format_utctime(last_updated) | h}</abbr>
  57. </div>