Browse Source

Display empty member list correctly.

master
Ben Kurtovic 8 years ago
parent
commit
dda18add9a
2 changed files with 20 additions and 17 deletions
  1. +2
    -2
      calefaction/eve/esi.py
  2. +18
    -15
      templates/members/members.mako

+ 2
- 2
calefaction/eve/esi.py View File

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


self._debug("[%s] [%s] %s", method.__name__.upper(), 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 return cached


headers = { headers = {


+ 18
- 15
templates/members/members.mako View File

@@ -1,17 +1,20 @@
<%inherit file="../_default.mako"/> <%inherit file="../_default.mako"/>
<h2>Members</h2> <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

Loading…
Cancel
Save