Explorar el Código

Display empty member list correctly.

master
Ben Kurtovic hace 8 años
padre
commit
dda18add9a
Se han modificado 2 ficheros con 20 adiciones y 17 borrados
  1. +2
    -2
      calefaction/eve/esi.py
  2. +18
    -15
      templates/members/members.mako

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

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

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

Cargando…
Cancelar
Guardar