Commit de333a45 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Change some templates to allow rectangular icons using maxwidth, maxheight

parent a979fdc4
......@@ -249,7 +249,8 @@ function build_admin_user_search_results($search, $offset, $limit, $sortby, $sor
$cols = array(
'icon' => array('name' => '',
'template' => '<img src="' . get_config('wwwroot') . 'thumb.php?type=profileicon&size=40x40&id={$r.id}" alt="' . get_string('profileimage') . '" />'),
'template' => '<img src="' . get_config('wwwroot') . 'thumb.php?type=profileicon&maxwidth=40&maxheight=40&id={$r.id}" alt="' . get_string('profileimage') . '" />',
'class' => 'center'),
'firstname' => array('name' => get_string('firstname')),
'lastname' => array('name' => get_string('lastname')),
'username' => array('name' => get_string('username'),
......
......@@ -12,7 +12,7 @@
</tr>
{foreach from=$users item='user' key='userid'}
<tr class="{cycle values="r0,r1"}">
<td><img src="{$WWWROOT}thumb.php?type=profileicon&size=40x40&id={$userid}" alt="profile icon"/></td>
<td class='center'><img src="{$WWWROOT}thumb.php?type=profileicon&maxwidth=40&maxheight=40&id={$userid}" alt="profile icon"/></td>
<td>{display_name user=$user.user}</td>
<td>
{foreach from=$user.user->institutions item=i}
......
......@@ -206,7 +206,7 @@ searchTable.rowfunction = function(rowdata, rownumber, globaldata) {
var profileIcon, tutorAddButton = null;
if (rowdata.type == 'user') {
profileIcon = IMG({'src': config.wwwroot + 'thumb.php?type=profileicon&size=40x40&id=' + rowdata.id});
profileIcon = IMG({'src': config.wwwroot + 'thumb.php?type=profileicon&maxwidth=40&maxheight=40&id=' + rowdata.id});
}
else if (rowdata.type == 'group') {
tutorAddButton = BUTTON({'type': 'button', 'class': 'button'}, '{{str tag=addtutors section=view}}');
......
......@@ -26,11 +26,7 @@
{foreach from=$results.data item=r}
<tr class="{cycle values="r0,r1"}">
{foreach from=$cols key=f item=c}
{if empty($c.template)}
<td>{$r[$f]}</td>
{else}
<td>{eval var=$c.template}</td>
{/if}
<td{if (!empty($c.class))} class="{$c.class}"{/if}>{if empty($c.template)}{$r[$f]}{else}{eval var=$c.template}{/if}</td>
{/foreach}
</tr>
{/foreach}
......
<h3><a href="{$WWWROOT}user/view.php?id={$data.id}">{$data.id|display_name|escape}</a></h3>
<div class="fr"><a href="{$WWWROOT}user/view.php?id={$data.id}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=50&amp;id={$data.id}" alt=""></a></div>
<div class="fr"><a href="{$WWWROOT}user/view.php?id={$data.id}"><div class="center" style="width: 50px; height: 50px;"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=50&amp;maxheight=50&amp;id={$data.id}" alt=""></div></a></div>
<ul class="sidebar-ul-title">
{if $data.unreadnotifications}
<li>
......
<div>
<div class="fl">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;size=50x50&amp;id={$user->id}" alt="">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=50&amp;maxheight=50&amp;id={$user->id}" alt="">
</div>
<h3>
<a href="{$WWWROOT}user/view.php?id={$user->id}">
......
{if $user->pending}
<td class="pending">
<div class="fl">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;size=40x40&amp;id={$user->id}" alt="">
<div class="center" style="width: 40px; height: 40px;">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=40&amp;maxheight=40&amp;id={$user->id}" alt="">
</div>
</div>
<table class="friendinfo">
<tr>
......@@ -51,7 +53,9 @@
{elseif $user->friend}
<td>
<div class="fl">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;size=40x40&amp;id={$user->id}" alt="">
<div class="center" style="width: 40px; height: 40px;">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=40&amp;maxheight=40&amp;id={$user->id}" alt="">
</div>
</div>
<table class="friendinfo">
<tr>
......@@ -117,7 +121,9 @@
{elseif $user->requestedfriendship}
<td>
<div class="fl">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;size=40x40&amp;id={$user->id}" alt="">
<div class="center" style="width: 40px; height: 40px;">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=40&amp;maxheight=40&amp;id={$user->id}" alt="">
</div>
</div>
<table class="friendinfo">
<tr>
......@@ -155,7 +161,9 @@
{else}
<td>
<div class="fl">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;size=40x40&amp;id={$user->id}" alt="">
<div class="center" style="width: 40px; height: 40px;">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=40&amp;maxheight=40&amp;id={$user->id}" alt="">
</div>
</div>
<table class="friendinfo">
<tr>
......
......@@ -11,7 +11,7 @@
</h2>
<div>
<div class="fr">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=100&amp;id={$USERID}" alt="">
<div class="center" style="width: 50px; height: 50px;"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=100&amp;maxheight=100&amp;id={$USERID}" alt=""></div>
{if $canmessage}
<br>
<a href="{$WWWROOT}user/sendmessage.php?id={$USERID}&amp;returnto=view">{str tag='sendmessage' section='group'}</a>
......@@ -92,7 +92,7 @@
{foreach from=$row item=friend}
<td class="friendcell">
<a href="{$WWWROOT}user/view.php?id={$friend}">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=60&amp;id={$friend}" alt="">
<img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxwidth=60&amp;maxheight=60&amp;id={$friend}" alt="">
<br>{$friend|display_name|escape}
</a>
</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment