Преглед на файлове

Display empty member list correctly.

master
Ben Kurtovic преди 8 години
родител
ревизия
dda18add9a
променени са 2 файла, в които са добавени 20 реда и са изтрити 17 реда
  1. +2
    -2
      calefaction/eve/esi.py
  2. +18
    -15
      templates/members/members.mako

+ 2
- 2
calefaction/eve/esi.py Целия файл

@@ -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 Целия файл

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

Зареждане…
Отказ
Запис