Ver código fonte

Display empty member list correctly.

master
Ben Kurtovic 8 anos atrás
pai
commit
dda18add9a
2 arquivos alterados com 20 adições e 17 exclusões
  1. +2
    -2
      calefaction/eve/esi.py
  2. +18
    -15
      templates/members/members.mako

+ 2
- 2
calefaction/eve/esi.py Ver arquivo

@@ -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 Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar