Add default app icon.

This commit is contained in:
Logan Hanks
2012-08-14 14:34:53 -07:00
parent 091dd7d574
commit bce9642b9b
3 changed files with 12 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -24,11 +24,16 @@
from r2.lib.template_helpers import static, s3_https_if_secure
%>
<%namespace file="utils.html" import="_md" />
<%
if thing.client.icon_url:
icon = s3_https_if_secure(thing.client.icon_url)
else:
icon = static("defaultapp.png")
%>
<div class="content oauth2-authorize">
<div class="icon">
&nbsp;
<img src="${s3_https_if_secure(thing.client.icon_url)}"
alt="${thing.client.name} icon" />
<img src="${icon}" alt="${thing.client.name} icon" />
&nbsp;
</div>
%if thing.client.about_url:

View File

@@ -1,3 +1,7 @@
<%!
from r2.lib.template_helpers import static
%>
<%namespace name="utils" file="utils.html" />
<%namespace file="utils.html" import="error_field, plain_link" />
<%namespace file="printablebuttons.html" import="ajax_ynbutton, ynbutton" />
@@ -5,7 +9,7 @@
<%def name="icon(app)">
<div class="app-icon">
&nbsp;
<img src="${app.icon_url}">
<img src="${app.icon_url or static('defaultapp.png')}">
&nbsp;
</div>
</%def>