Commit ecff21a9 authored by Pat Kira's avatar Pat Kira Committed by Aaron Wells

Style my friends and find friends (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I6c0088a8ce6cb27e4c1093246320a1de734eda1d
parent c19c19d0
......@@ -111,6 +111,7 @@ $form = array(
),
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('savegroup', 'group'), get_string('cancel')),
'goto' => get_config('wwwroot') . 'group/mygroups.php',
),
......
......@@ -1086,6 +1086,7 @@ function group_get_join_form($name, $groupid, $returnto='view') {
'elements' => array(
'join' => array(
'type' => 'submit',
'class' => 'btn btn-primary btn-xs',
'value' => get_string('joingroup', 'group')
),
'group' => array(
......@@ -1106,15 +1107,18 @@ function group_get_join_form($name, $groupid, $returnto='view') {
function group_get_accept_form($name, $groupid, $returnto) {
return pieform(array(
'name' => $name,
'class' => 'group-request',
'renderer' => 'oneline',
'successcallback' => 'group_invite_submit',
'elements' => array(
'accept' => array(
'type' => 'submit',
'class' => 'btn btn-primary btn-xs',
'value' => get_string('acceptinvitegroup', 'group')
),
'decline' => array(
'type' => 'submit',
'class' => 'btn btn-default btn-xs',
'value' => get_string('declineinvitegroup', 'group')
),
'group' => array(
......
......@@ -1467,7 +1467,7 @@ EOF;
}
if (!empty($element['hiddenlabel'])) {
$labelclass = ' class="accessible-hidden sr-only"';
$labelclass = ' class="sr-only"';
}
else {
$labelclass = '';
......
......@@ -2107,7 +2107,7 @@ function acceptfriend_form($friendid) {
'elements' => array(
'acceptfriend_submit' => array(
'type' => 'submit',
'class' => 'btn btn-success',
'class' => 'btn btn-success btn-sm',
'value' => get_string('approverequest', 'group'),
),
'id' => array(
......
<div class="group-info">
<!-- <div class="group-info"> commented out at the moment as it's uncessary-->
{include file="group/info.tpl"}
</div>
<!-- </div> -->
<div class="friends">
{if $groupmembers}
{$groupmembers.tablerows|safe}
{$groupmembers.tablerows|safe}
{/if}
<div class="cl morelinkwrap"><a class="morelink" href="{$show_all.url}">{$show_all.message} &raquo;</a></div>
<a class="morelink panel-footer" href="{$show_all.url}">
{$show_all.message}
<span class="fa fa-arrow-circle-right mls pull-right"></span>
</a>
</div>
{foreach from=$groupmembers item=groupmember}
<div class="{cycle values='d0,d1'} friendcell center">
<a href="{profile_url($groupmember)}">
<img src="{profile_icon_url user=$groupmember maxwidth=60 maxheight=60}" alt="{str tag=profileimagetext arg1=$groupmember|display_default_name}" title="{$groupmember|display_default_name|escape}">
</a>
<div class="membername"><a href="{profile_url($groupmember)}">{$groupmember|display_default_name|escape}</a></div>
<div class="friendcell panel-body">
<div class="row">
{foreach from=$groupmembers item=groupmember}
<div class="col-xs-6 col-md-3 userthumb">
<a href="{profile_url($groupmember)}" class="thumbnail" height="130px">
<img src="{profile_icon_url user=$groupmember maxwidth=60 maxheight=60}" alt="{str tag=profileimagetext arg1=$groupmember|display_default_name}" title="{$groupmember|display_default_name|escape}">
<span class="metadata">{$groupmember|display_default_name|escape}</span>
</a>
</div>
{/foreach}
{/foreach}
</div>
</div>
<div class="listgroup">
<!-- <div class="panel-body listing"> -->
{if $groupviews}
<div class="groupviewsection">
<div class="groupviewsection list-">
<h3 class="title">{str tag="groupviews" section="view"}</h3>
<div id="groupviewlist" class="fullwidth listing">
<div id="groupviewlist" class="list-group">
{$groupviews.tablerows|safe}
</div>
{if $groupviews.pagination}
......@@ -19,13 +21,14 @@
{/if}
{if $sharedviews}
<div class="groupviewsection">
<div class="groupviewsection listrow">
<h3 class="title">{str tag="viewssharedtogroup" section="view"}</h3>
<div id="sharedviewlist" class="fullwidth listing">
<div id="sharedviewlist" class="list-group">
{$sharedviews.tablerows|safe}
</div>
{if $sharedviews.pagination}
<div id="sharedviews_page_container" class="hidden center">{$sharedviews.pagination|safe}</div>
<div id="sharedviews_page_container" class="hidden center">{$sharedviews.pagination|safe}
</div>
{/if}
{if $sharedviews.pagination_js}
<script>
......@@ -40,9 +43,9 @@
{if $sharedcollections}
<div class="groupviewsection">
<div class="groupviewsection listrow">
<h3 class="title">{str tag="collectionssharedtogroup" section="collection"}</h3>
<div id="sharedcollectionlist" class="fullwidth listing">
<div id="sharedcollectionlist" class="list-group">
{$sharedcollections.tablerows|safe}
</div>
{if $sharedcollections.pagination}
......@@ -61,11 +64,11 @@
{if $mysubmitted || $group_view_submission_form}
<div class="groupviewsection">
<div class="groupviewsection listrow">
{if $group_view_submission_form}
<h3 class="title">{str tag="submittogroup" section="view"}</h3>
{/if}
<div class="fullwidth listing">
<div class="list-group">
{if $mysubmitted}
{foreach from=$mysubmitted item=item}
<div class="{cycle values='r0,r1'} submittedform">
......@@ -87,9 +90,9 @@
{/if}
{if $allsubmitted}
<div class="groupviewsection">
<div class="groupviewsection listrow">
<h3 class="title">{str tag="submissionstogroup" section="view"}</h3>
<div id="allsubmissionlist" class="fullwidth listing">
<div id="allsubmissionlist" class="fullwidth">
{$allsubmitted.tablerows|safe}
</div>
{if $allsubmitted.pagination}
......@@ -105,3 +108,4 @@
{/if}
</div>
{/if}
</div>
{foreach from=$items item=view}
<div class="{cycle values='r0,r1'} listrow">
<div class="{cycle values='r0,r1'} list-group-item">
{if $view.template}
<div class="s fr">{$view.form|safe}</div>
<div class="">{$view.form|safe}</div>
{/if}
<h4 class="title"><a href="{$view.fullurl}">{$view.title}</a>
<h4 class="title">
<a href="{$view.fullurl}">
{$view.title}
</a>
</h4>
<div class="detail">{$view.description|str_shorten_html:100:true|strip_tags|safe}</div>
{if $view.tags}
<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$view.owner tags=$view.tags}</div>
{/if}
<div class="detail">
{$view.description|str_shorten_html:100:true|strip_tags|safe}
</div>
{if $view.tags}
<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$view.owner tags=$view.tags}</div>
{/if}
</div>
{/foreach}
{foreach from=$items item=item}
<div class="{cycle values='r0,r1'} listrow">
<h3 class="title"><a href="{group_homepage_url($item)}">{$item->name}</a><span class="roledisplay"> - {$item->roledisplay}</span></h3>
{if $item->description}
<div class="details">{$item->description|str_shorten_html:100:true|safe}</div>
{/if}
</div>
<div class="listrow">
<h3 class="title"><a href="{group_homepage_url($item)}">{$item->name}</a><span class="roledisplay"> - {$item->roledisplay}</span></h3>
{if $item->description}
<div class="details">
{$item->description|str_shorten_html:100:true|safe}
</div>
{/if}
</div>
{/foreach}
\ No newline at end of file
{if $foruminfo}
<table class="fullwidth" id="latestforumposts">
{foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}">
<td><h3 class="title"><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic|escape}&post={$postinfo->id}">{$postinfo->topicname}</a></h3>
<div class="detail">{$postinfo->body|str_shorten_html:100:true|safe}</div></td>
<td class="valign right s"><a href="{profile_url($postinfo->author)}"><img src="{profile_icon_url user=$postinfo->author maxheight=20 maxwidth=20}" alt="{str tag=profileimagetext arg1=$postinfo->author|display_default_name}"> {$postinfo->author|display_name}</a>
</td>
</tr>
{/foreach}
</table>
{else}
<table class="fullwidth"><tr class="{cycle values='r0,r1'}">
<td align="center">{str tag=noforumpostsyet section=interaction.forum}</td>
</tr>
</table>
{/if}
<div class="morelinkwrap"><a class="morelink" href="{$WWWROOT}interaction/forum/index.php?group={$group->id}">{str tag=gotoforums section=interaction.forum} &raquo;</a></div>
{if $foruminfo}
<table class="fullwidth table panel-body" id="latestforumposts">
{foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}">
<td><h3 class="title"><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic|escape}&post={$postinfo->id}">{$postinfo->topicname}</a></h3>
<div class="detail">{$postinfo->body|str_shorten_html:100:true|safe}</div></td>
<td class="valign right s"><a href="{profile_url($postinfo->author)}"><img src="{profile_icon_url user=$postinfo->author maxheight=20 maxwidth=20}" alt="{str tag=profileimagetext arg1=$postinfo->author|display_default_name}"> {$postinfo->author|display_name}</a>
</td>
</tr>
{/foreach}
</table>
{else}
<table class="fullwidth table panel-body"><tr class="{cycle values='r0,r1'}">
<td align="center">{str tag=noforumpostsyet section=interaction.forum}</td>
</tr>
</table>
{/if}
<a class="morelink panel-footer" href="{$WWWROOT}interaction/forum/index.php?group={$group->id}">
{str tag=gotoforums section=interaction.forum}
<span class="fa fa-arrow-circle-right mls pull-right"></span>
</a>
<div id="recentforumpostsblock">
{if $foruminfo}
<table class="fullwidth">
{foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}">
<td><h3 class="title"><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic}&post={$postinfo->id}">{$postinfo->topicname}</a></h3>
<div class="detail">{$postinfo->body|str_shorten_html:100:true|safe}</div></td>
<td class="poster valign right"><a href="{profile_url($postinfo->author)}"><img src="{profile_icon_url user=$postinfo->author maxheight=20 maxwidth=20}" alt="{str tag=profileimagetext arg1=$postinfo->author|display_default_name}"><br />{$postinfo->author|display_name}</a></td>
</tr>
{/foreach}
</table>
{else}
<table class="fullwidth"><tr class="{cycle values='r0,r1'}">
<td align="center">{str tag=noforumpostsyet section=interaction.forum}</td>
</tr>
</table>
{/if}
<div class="morelinkwrap"><a class="morelink" href="{$WWWROOT}interaction/forum/index.php?group={$group->id}" target="_blank">{str tag=gotoforums section=interaction.forum} &raquo;</a></div>
<div class="cb"></div>
</div>
<div id="recentforumpostsblock">
{if $foruminfo}
<table class="fullwidth">
{foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}">
<td><h3 class="title"><a href="{$WWWROOT}interaction/forum/topic.php?id={$postinfo->topic}&post={$postinfo->id}">{$postinfo->topicname}</a></h3>
<div class="detail">{$postinfo->body|str_shorten_html:100:true|safe}</div></td>
<td class="poster valign right"><a href="{profile_url($postinfo->author)}"><img src="{profile_icon_url user=$postinfo->author maxheight=20 maxwidth=20}" alt="{str tag=profileimagetext arg1=$postinfo->author|display_default_name}"><br />{$postinfo->author|display_name}</a></td>
</tr>
{/foreach}
</table>
{else}
<table class="fullwidth"><tr class="{cycle values='r0,r1'}">
<td align="center">{str tag=noforumpostsyet section=interaction.forum}</td>
</tr>
</table>
{/if}
<div class="morelinkwrap"><a class="morelink" href="{$WWWROOT}interaction/forum/index.php?group={$group->id}" target="_blank">{str tag=gotoforums section=interaction.forum} &raquo;</a></div>
<div class="cb"></div>
</div>
......@@ -246,6 +246,13 @@ select {
}
}
.form-group-inline {
&.select,
&.text {
margin-right: 10px;
}
}
.wysiwyg label,
.textarea label {
vertical-align: top;
......
......@@ -3,34 +3,58 @@
.listing {
.listrow {
@include clearfix;
padding: 10px;
padding: 15px;
border-top: 1px solid #ddd;
&:first-child {
border-top: none;
}
.user-icon {
display: inline-block;
width: 30px;
}
.title {
display: inline-block;
font-size: $font-size-large;
margin: 0;
}
.list-element-detail {
font-size: $font-size-small;
padding-top: 5px;
}
.detail {
@extend .list-element-detail;
clear: both;
font-size: $font-size-small;
}
.groupsdetails {
@extend .list-element-detail;
clear: left;
.content {
margin-top: 10px;
padding-left: 0;
@media (min-width: $screen-sm-min) {
padding-left: 40px;
}
}
.actionlist {
&.groupuserstatus {
max-width: 200px;
}
clear: both;
float: none;
font-size: $font-size-small;
padding: 15px 0 0 0;
margin-bottom: 0;
@media (min-width: $screen-sm-min) {
clear: none;
float: right;
padding: 0 0 0 15px;
}
.memberof {
font-weight: bold;
}
}
}
}
.list-group-item-link{
.list-group-item-link {
margin: 5px -15px 0;
li a {
font-size: 0.9em;
......
......@@ -21,6 +21,11 @@
width: 97%;
}
}
&.pending {
.panel-footer {
background-color: #ffffff;
}
}
}
}
......@@ -111,7 +116,9 @@ a.panel-footer {
clear:both;
margin: 15px -15px -16px; //alter padding for panel footers inside panel-body (needed for some forms)
}
.userthumb {
height: 133px;
}
}
.collapsible legend h4,
......@@ -272,4 +279,8 @@ a.panel-footer {
}
}
}
}
.small-text {
font-size: $font-size-small;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{include file="header.tpl"}
{if $candeleteself}
<div class="message deletemessage">
<div class="deletemessage">
<div class="deletebuttonwrap">
<a href="{$WWWROOT}account/delete.php" class="btn btn-success delete">
{str tag=deleteaccount section=account}
......
......@@ -6,21 +6,21 @@
<p>{str tag=nogroups section=group}</p>
{else}
<div class="fullwidth center">
{foreach from=$data key=addtype item=groups}
{if $groups}
{foreach from=$data key=addtype item=groups}
{if $groups}
<div class="fl jointype">
<h3>{if $addtype == 'add'}{str tag=addmembers section=group}{else}{str tag=invite section=group}{/if}</h3>
<ul>
{foreach from=$groups item=group}
<li>
<input type="checkbox" class="checkbox" name="{$addtype}group_{$userid}" value="{$group->id}"{if $group->checked} checked{/if}{if $group->disabled} disabled{/if}> {$group->name}
</li>
{/foreach}
<li class="last"><a class="btn" href="" onclick="changemembership(event, {$userid}, '{$addtype}');">{str tag=applychanges}</a></li>
{/if}
</ul>
<h3>{if $addtype == 'add'}{str tag=addmembers section=group}{else}{str tag=invite section=group}{/if}</h3>
<ul>
{foreach from=$groups item=group}
<li>
<input type="checkbox" class="checkbox" name="{$addtype}group_{$userid}" value="{$group->id}"{if $group->checked} checked{/if}{if $group->disabled} disabled{/if}> {$group->name}
</li>
{/foreach}
<li class="last"><a class="btn" href="" onclick="changemembership(event, {$userid}, '{$addtype}');">{str tag=applychanges}</a></li>
{/if}
</ul>
</div>
{/foreach}
{/foreach}
</div>
{/if}
<div class="cb"></div>
......
{include file="header.tpl"}
<div class="ptl pbl">
{$form|safe}
{if $groups}<div id="findgroups" class="fullwidth listing">
{foreach from=$groups item=group}
<div class="listrow {cycle values='r0,r1'}">
{include file="group/group.tpl" group=$group returnto='mygroups'}
<div class="cb"></div>
</div>
{/foreach}
</div>
</div>
{if $groups}
<div class="panel panel-default mtl">
<h2 class="panel-heading">{str tag=Results}</h2>
<div id="findgroups" class="panel-body listing">
{foreach from=$groups item=group}
<div class="listrow">
{include file="group/group.tpl" group=$group returnto='mygroups'}
</div>
{/foreach}
</div>
</div>
{$pagination|safe}
{else}
<div class="message">{str tag="nogroupsfound" section="group"}</div>
<div class="no-result">
{str tag="nogroupsfound" section="group"}
</div>
{/if}
{include file="footer.tpl"}
<h3 class="title pull-left">
<a href="{group_homepage_url($group)}">
{$group->name}
</a>
</h3>
{include file="group/groupuserstatus.tpl" group=$group returnto='find'}
<div class="groupsdetails pull-left">
{if $group->settingsdescription}
<div class="groupliststatus">
{$group->settingsdescription}
</div>
{/if}
<div class="detail">
{$group->description|str_shorten_html:100:true|safe}
</div>
{if $group->editwindow}
<div class="groupeditable">
{str tag=editable section=group}: {$group->editwindow}
</div>
{/if}
<div class="groupadmin">
{str tag=groupadmins section=group}:
{foreach name=admins from=$group->admins item=user}
<a href="{profile_url($user)}">{$user|display_name}</a>
{if !$.foreach.admins.last},
{/if}{/foreach}
</div>
{if $group->membercount}
<div class="membernumber">
<a href="{$WWWROOT}group/members.php?id={$group->id}">
{str tag=nmembers section=group arg1=$group->membercount}
<div class="pull-left">
<h3 class="title">
<a href="{group_homepage_url($group)}">
{$group->name}
</a>
{if $group->settingsdescription}
<span class="groupliststatus metadata">
- {$group->settingsdescription}
</span>
{/if}
</h3>
<div class="groupsdetails">
{if $group->editwindow}
<div class="groupeditable detail">
<strong class="prs">{str tag=editable section=group}:</strong>
{$group->editwindow}
</div>
{/if}
<div class="groupadmin detail">
<strong class="prs">{str tag=groupadmins section=group}:</strong>
{foreach name=admins from=$group->admins item=user}
<a href="{profile_url($user)}"> {$user|display_name}</a>
{if !$.foreach.admins.last},
{/if}{/foreach}
</div>
{if $group->membercount}
<div class="membernumber">
<a href="{$WWWROOT}group/members.php?id={$group->id}">
{str tag=nmembers section=group arg1=$group->membercount}
</a>
</div>
{/if}
<div class="mtm">
{$group->description|str_shorten_html:100:true|safe}
</div>
</div>
{/if}
</div>
{include file="group/groupuserstatus.tpl" group=$group returnto='find'}
<ul class="groupuserstatus pull-right list-unstyled">
<ul class="groupuserstatus actionlist pull-right list-unstyled">
{if $group->membershiptype == 'member'}
<li class="member">
{if $group->role == 'member' || $group->role == 'admin'}
......
<ul>
<li>{$group->settingsdescription}</li>
<li><strong class="groupinfolabel">{str tag=groupadmins section=group}:</strong> {foreach name=admins from=$group->admins item=user}
<img src="{profile_icon_url user=$user maxwidth=20 maxheight=20}" alt="{str tag=profileimagetext arg1=$user|display_default_name}">
<a href="{profile_url($user)}">{$user|display_name}</a>{if !$.foreach.admins.last}, {/if}
{/foreach}</li>
{if $group->categorytitle}<li><strong>{str tag=groupcategory section=group}:</strong> {$group->categorytitle}</li>{/if}
<li><strong class="groupinfolabel">{str tag=Created section=group}:</strong> {$group->ctime}</li>
{if $editwindow}<li><strong class="groupinfolabel">{str tag=editable section=group}:</strong> {$editwindow}</li>{/if}
<li class="last">
{if $group->membercount}<span><strong>{str tag=Members section=group}:</strong>&nbsp;{$group->membercount}</span>{/if}
<span><strong>{str tag=Views section=view}:</strong>&nbsp;{$group->viewcount}</span>
<span><strong>{str tag=Files section=artefact.file}:</strong>&nbsp;{$group->filecounts->files}</span>
<span><strong>{str tag=Folders section=artefact.file}:</strong>&nbsp;{$group->filecounts->folders}</span>
<span><strong>{str tag=nameplural section=interaction.forum}:</strong>&nbsp;{$group->forumcounts}</span>
<span><strong>{str tag=Topics section=interaction.forum}:</strong>&nbsp;{$group->topiccounts}</span>
<span><strong>{str tag=Posts section=interaction.forum}:</strong>&nbsp;{$group->postcounts}</span>
</li>
</ul>
<h3 class="panel-heading">