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.
 
 
 
 
 

26 lines
1.2 KiB

  1. <%! import humanize %>
  2. <%def name="_killboard_recent(summary)">
  3. <ul class="summary">
  4. % for kill in summary:
  5. <li>
  6. <a href="https://zkillboard.com/kill/${kill['id']}/">${kill["id"]}</a>
  7. ${kill["system"]}
  8. <abbr title="${kill["date"].strftime("%Y-%m-%d %H:%M")}">${humanize.naturaltime(kill["date"]) | h}</abbr>
  9. <img src="${g.eve.image.render(kill["victim"]["ship_id"], 128)}"/>
  10. <img src="${g.eve.image.character(kill["victim"]["char_id"], 128)}"/>
  11. <img src="${g.eve.image.corp(kill["victim"]["corp_id"], 128)}"/>
  12. <img src="${g.eve.image.alliance(kill["victim"]["alliance_id"], 128)}"/>
  13. <img src="${g.eve.image.faction(kill["victim"]["faction_id"], 128)}"/>
  14. <abbr title="${"{:,.2f}".format(kill["value"])} ISK">${humanize.intword(kill["value"]) | h} ISK</abbr>
  15. </li>
  16. % endfor
  17. </ul>
  18. </%def>
  19. <%def name="render_summary(renderer, summary)"><%
  20. if renderer == "killboard_recent":
  21. return _killboard_recent(summary)
  22. else:
  23. raise RuntimeError("Unknown renderer: %s" % renderer)
  24. %></%def>