Commit c523d4e1 authored by Nigel McNie's avatar Nigel McNie
Browse files

Tidied up a bunch of stuff under the Groups tab (WIP).

Still have to look at each page in detail, but they roughly work now.
parent d0e7a978
......@@ -152,7 +152,7 @@ function search_submit(Pieform $form, $values) {
}
$smarty = smarty();
$smarty->assign('heading', TITLE);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->assign('form', $searchform);
$smarty->assign('groups', $groups['data']);
$smarty->assign('pagination', $pagination['html']);
......
......@@ -81,7 +81,7 @@ $smarty->assign('form', $form);
$smarty->assign('filter', $filter);
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('searchingforgroups', array('<a href="' . get_config('wwwroot') . 'group/find.php">', '</a>'));
$smarty->assign('heading', get_string('mygroups'));
$smarty->assign('PAGEHEADING', hsc(get_string('mygroups')));
$smarty->display('group/mygroups.tpl');
function filter_submit(Pieform $form, $values) {
......
......@@ -217,6 +217,9 @@ td {
#main-column-container, div.rel {
position: relative;
}
.listing {
font-size: .9em;
}
/* Informational messages */
#messages {
......@@ -418,19 +421,25 @@ div.sideblock h3 {
padding: .2em .5em;
text-decoration: none;
}
.btn-del {
color: #ca0000;
.btn-del, .btn-msg, .btn-req, .btn-edit, .btn-pending, .btn-leavegroup {
padding-left: 1em;
}
.btn-del, .btn-leavegroup {
color: #ca0000;
background: url(../images/icon-delete.gif) no-repeat left 50%;
}
.btn-msg {
background: url(../images/icon-mail.gif) no-repeat left 4px;
font-weight: bold;
padding-left: 1em;
}
.btn-req {
background: url(../images/icon-add.gif) no-repeat left 4px;
padding-left: 1em;
}
.btn-edit {
background: url(../images/icon-edit.gif) no-repeat left 4px;
}
.btn-pending {
background: url(../images/icon-pending.gif) no-repeat left 3px;
}
input#addfriend_add,
input#myfriends_addfriend_add {
......@@ -505,27 +514,20 @@ div.pagination {
/* Specific page rules */
/* My Views */
#myviews .btn-d {
font-size: .85em;
#myviews h3 {
font-size: 1.5em;
}
#myviews .vi {
font-size: .9em;
float: left;
line-height: 1.2em;
padding: .5em 1.5em .5em 0;
width: 30%;
}
#myviews .videsc {
font-size: .9em;
}
/* todo: check the below three rules */
#myviews .submit-viewitem {
float: left;
padding: .25em 0;
}
#myviews .submit-viewitem select {
font-size: .9em;
}
#myviews .submitted-viewitem {
float: left;
padding: .5em 1.5em .5em 1.5em;
......@@ -535,6 +537,65 @@ div.pagination {
width: 60%;
}
/* My Groups */
ul.groupuserstatus {
margin: .5em 1em;
/*float: right;*/
width: 200px;
position: absolute;
top: 0;
right: 0;
}
ul.groupuserstatus li {
list-style: none;
margin: 0;
border-bottom: 1px solid #d1d1d1;
}
ul.groupuserstatus li.last {
border-bottom: none;
}
form#search {
/* Also applies to Find Friends */
margin-bottom: 1em;
}
/* My Friends */
#friendslist ul.viewlist {
margin: 0;
font-size: 1em;
}
#friendslist ul.viewlist li.label {
background: none;
padding-left: 0;
}
#friendslist ul.viewlist li {
display: inline;
margin: 0;
padding-left: 1em;
background: url(../images/divider-dot.gif) no-repeat left;
}
#friendslist ul.actionlist {
margin: 0 1em;
float: right;
width: 200px;
}
#friendslist ul.actionlist li {
list-style: none;
margin: 0;
padding: 0 .25em;
border-bottom: 1px solid #d1d1d1;
}
#friendslist ul.actionlist li.last {
border-bottom: none;
}
#friendslist .leftdiv {
float: left;
}
#friendslist .rightdiv {
min-height: 35px;
padding: .5em 0 0 4.5em;
}
/* Export */
#export h3 {
margin: .5em 0;
......
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
{$form}
{if $groups}
<table id="findgroups" class="fullwidth">
<table id="findgroups" class="fullwidth listing">
{foreach from=$groups item=group name=groups}
<tr class="r{cycle values=0,1}">
<td>
<tbody>
<tr class="r{cycle values=0,1}">
<td><div class="rel">
{include file="group/group.tpl" group=$group returnto='find'}
</td>
</tr>
</div></td>
</tr>
{/foreach}
</table>
</tbody>
</table>
{$pagination}
{else}
<div class="message">
{str tag="nogroupsfound" section="group"}
</div>
<div class="message">{str tag="nogroupsfound" section="group"}</div>
{/if}
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
{include file="group/groupuserstatus.tpl" group=$group returnto='find'}
<h3><a href="{$WWWROOT}group/view.php?id={$group->id|escape}">{$group->name|escape}</a></h3>
{include file="group/groupuserstatus.tpl" group=$group returnto='find'}
<h5>{foreach name=admins from=$group->admins item=id}<a href="{$WWWROOT}user/view.php?id={$id|escape}">{$id|display_name|escape}</a>{if !$smarty.foreach.admins.last}, {/if}{/foreach}</h5>
{$group->description}
<div id="groupmembers">{str tag="memberslist" section="group"}
......
<ul class="groupuserstatus">
{if $group->membershiptype == 'member'}
{if $group->membershiptype == 'member'}
<li class="member">{str tag="youaregroupmember" section="group"}</li>
{if $group->canleave}
<li><a href = "{$WWWROOT}group/leave.php?id={$group->id|escape}&amp;returnto={$returnto}" id="btn-leavegroup">{str tag="leavegroup" section="group"}</a></li>
{/if}
{elseif $group->membershiptype == 'admin'}
<li><a href="{$WWWROOT}group/edit.php?id={$group->id|escape}" id="btn-edit">{str tag="edit"}</a></li>
<li><a href="{$WWWROOT}group/delete.php?id={$group->id|escape}" id="btn-delete">{str tag="delete"}</a></li>
{if $group->canleave}
<li><a href = "{$WWWROOT}group/leave.php?id={$group->id|escape}&amp;returnto={$returnto}" class="btn-leavegroup">{str tag="leavegroup" section="group"}</a></li>
{/if}
{elseif $group->membershiptype == 'admin'}
<li><a href="{$WWWROOT}group/edit.php?id={$group->id|escape}" class="btn-edit">{str tag="edit"}</a></li>
<li><a href="{$WWWROOT}group/delete.php?id={$group->id|escape}" class="btn-del">{str tag="delete"}</a></li>
{if $group->jointype == 'request' && $group->requests}
{if $group->jointype == 'request' && $group->requests}
<li>
{if $group->requests == 1}
<a href="{$WWWROOT}group/members.php?id={$group->id|escape}&amp;membershiptype=request" id="btn-pending">{str tag="thereispendingrequest" section="group"}</a>
{else}
<a href="{$WWWROOT}group/members.php?id={$group->id|escape}&amp;membershiptype=request" id="btn-pending">{str tag="therearependingrequests" section="group" args=$group->requests}</a>
{/if}
{if $group->requests == 1}
<a href="{$WWWROOT}group/members.php?id={$group->id|escape}&amp;membershiptype=request" class="btn-pending">{str tag="thereispendingrequest" section="group"}</a>
{else}
<a href="{$WWWROOT}group/members.php?id={$group->id|escape}&amp;membershiptype=request" class="btn-pending">{str tag="therearependingrequests" section="group" args=$group->requests}</a>
{/if}
</li>
{/if}
{/if}
{elseif $group->membershiptype == 'invite'}
{elseif $group->membershiptype == 'invite'}
<li>
{if $group->role}
{if $group->role}
{assign var=grouptype value=$group->grouptype}
{assign var=grouprole value=$group->role}
{str tag="grouphaveinvitewithrole" section="group"}: {str tag="$grouprole" section="grouptype.$grouptype"}
{else}
{else}
{str tag="grouphaveinvite" section="group"}
{/if}
{/if}
{$group->invite}
</li>
{elseif $group->membershiptype == 'request'}
{elseif $group->membershiptype == 'request'}
<li>{str tag="requestedtojoin" section="group"}</li>
{elseif $group->jointype == 'open'}
{elseif $group->jointype == 'open'}
{$group->groupjoin}
{elseif $group->jointype == 'request'}
<li><a href="{$WWWROOT}group/requestjoin.php?id={$group->id|escape}&amp;returnto={$returnto}" id="btn-requests">{str tag="requestjoingroup" section="group"}</a></li>
{elseif $group->jointype == 'request'}
<li><a href="{$WWWROOT}group/requestjoin.php?id={$group->id|escape}&amp;returnto={$returnto}" class="btn-req">{str tag="requestjoingroup" section="group"}</a></li>
{/if}
</ul>
\ No newline at end of file
{/if}
</ul>
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<div class="addgrouplink">
<span class="addicon fr">
<a href="{$WWWROOT}group/create.php" id="btn-creategroup">{str tag="creategroup" section="group"}</a>
</span>
</div>
<div class="rbuttons">
<a href="{$WWWROOT}group/create.php" class="btn">{str tag="creategroup" section="group"}</a>
</div>
{$form}
{if $groups}
<table id="mygroupstable" class="fullwidth">
<table class="fullwidth listing">
<tbody>
{foreach from=$groups item=group}
<tr class="r{cycle values=0,1}">
<td>
<tr class="r{cycle values=0,1}">
<td><div class="rel">
{include file="group/group.tpl" group=$group returnto='mygroups'}
</td>
</tr>
</div></td>
</tr>
{/foreach}
</table>
</tbody>
</table>
{$pagination}
{else}
<div class="message">
{str tag="trysearchingforgroups" section="group" args=$searchingforgroups}
</div>
<div class="message">{str tag="trysearchingforgroups" section="group" args=$searchingforgroups}</div>
{/if}
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<div id="friendslistcontainer">
{$form}
<div id="friendslistcontainer">
{$form}
{if $users}
<table id="friendslist" class="fullwidth">
{foreach from=$users item=user}
<tr class="r{cycle values=1,0}">
{include file="user/user.tpl" user=$user page='find'}
</tr>
{/foreach}
</table>
</div>
{$pagination}
{else}
{if $message}
<div class="message">
{$message}
</div>
{/if}
<table id="friendslist" class="fullwidth listing">
<tbody>
{foreach from=$users item=user}
<tr class="r{cycle values=1,0}">
{include file="user/user.tpl" user=$user page='find'}
</tr>
{/foreach}
</tbody>
</table>
</div>
{$pagination}
{elseif $message}
<div class="message">{$message}</div>
{/if}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
{include file="header.tpl"}
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<div id="friendslistcontainer">
{$form}
{if $users}
<table id="friendslist" class="fullwidth">
<table id="friendslist" class="fullwidth listing">
{foreach from=$users item=user}
<tr class="r{cycle values=1,0}">
{include file="user/user.tpl" user=$user page='myfriends'}
......@@ -22,6 +18,4 @@
</div>
{/if}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
{if $user->pending}
<td class="pending friendinfo">
<td class="pending friendinfo rel">
<ul class="actionlist">
{if $user->institutions}<li>{$user->institutions|escape}</li>{/if}
<li>{$user->accept}</li>
......
......@@ -14,7 +14,7 @@
{if $institution} {$institutionselector}{/if}
{if $views}
<table id="myviews" class="fullwidth">
<table id="myviews" class="fullwidth listing">
<tbody>
{foreach from=$views item=view}
<tr class="{cycle values=r0,r1}">
......
......@@ -73,7 +73,7 @@ if ($query && !$data['count']) {
}
$smarty = smarty(array(), array(), array(), array('sideblocks' => array(friends_control_sideblock('find'))));
$smarty->assign('heading', TITLE);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->assign('users', $data['data']);
$smarty->assign('form', $searchform);
$smarty->assign('pagination', $pagination['html']);
......
......@@ -151,7 +151,7 @@ function filter_submit(Pieform $form, $values) {
}
$smarty = smarty(array(), array(), array(), array('sideblocks' => array(friends_control_sideblock())));
$smarty->assign('heading', TITLE);
$smarty->assign('PAGEHEADING', hsc(TITLE));
$smarty->assign('users', $data);
$smarty->assign('form', $filterform);
$smarty->assign('pagination', $pagination['html']);
......
Supports Markdown
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