Bläddra i källkod

Display empty member list correctly.

master
Ben Kurtovic 7 år sedan
förälder
incheckning
dda18add9a
2 ändrade filer med 20 tillägg och 17 borttagningar
  1. +2
    -2
      calefaction/eve/esi.py
  2. +18
    -15
      templates/members/members.mako

+ 2
- 2
calefaction/eve/esi.py Visa fil

@@ -155,8 +155,8 @@ class EVESwaggerInterface:
cached = None

self._debug("[%s] [%s] %s", method.__name__.upper(),
"cache" if cached else "fresh", query)
if cached:
"fresh" if cached is None else "cache", query)
if cached is not None:
return cached

headers = {


+ 18
- 15
templates/members/members.mako Visa fil

@@ -1,17 +1,20 @@
<%inherit file="../_default.mako"/>
<h2>Members</h2>
<!-- ... handle case where members is empty - means something went wrong -->
<ul id="members-list">
% for member in members:
<li>
<a href="${g.eve.image.character(member.id, 1024)}">
<img class="styled-border" title="${member.name}" alt="${member.name}'s Portrait" src="${g.eve.image.character(member.id, 256)}"/>
</a>
% if member.roles:
<span>${member.name}<em>${member.roles}</em></span>
% else:
<span>${member.name}</span>
% endif
</li>
% endfor
</ul>
% if members:
<ul id="members-list">
% for member in members:
<li>
<a href="${g.eve.image.character(member.id, 1024)}">
<img class="styled-border" title="${member.name}" alt="${member.name}'s Portrait" src="${g.eve.image.character(member.id, 256)}"/>
</a>
% if member.roles:
<span>${member.name}<em>${member.roles}</em></span>
% else:
<span>${member.name}</span>
% endif
</li>
% endfor
</ul>
% else:
<p>You don't have access to the members list.</p>
% endif

Laddar…
Avbryt
Spara