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

Style my friends and find friends (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I6c0088a8ce6cb27e4c1093246320a1de734eda1d
parent c19c19d0
...@@ -111,6 +111,7 @@ $form = array( ...@@ -111,6 +111,7 @@ $form = array(
), ),
'submit' => array( 'submit' => array(
'type' => 'submitcancel', 'type' => 'submitcancel',
'class' => 'btn btn-success',
'value' => array(get_string('savegroup', 'group'), get_string('cancel')), 'value' => array(get_string('savegroup', 'group'), get_string('cancel')),
'goto' => get_config('wwwroot') . 'group/mygroups.php', 'goto' => get_config('wwwroot') . 'group/mygroups.php',
), ),
......
...@@ -1086,6 +1086,7 @@ function group_get_join_form($name, $groupid, $returnto='view') { ...@@ -1086,6 +1086,7 @@ function group_get_join_form($name, $groupid, $returnto='view') {
'elements' => array( 'elements' => array(
'join' => array( 'join' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-primary btn-xs',
'value' => get_string('joingroup', 'group') 'value' => get_string('joingroup', 'group')
), ),
'group' => array( 'group' => array(
...@@ -1106,15 +1107,18 @@ function group_get_join_form($name, $groupid, $returnto='view') { ...@@ -1106,15 +1107,18 @@ function group_get_join_form($name, $groupid, $returnto='view') {
function group_get_accept_form($name, $groupid, $returnto) { function group_get_accept_form($name, $groupid, $returnto) {
return pieform(array( return pieform(array(
'name' => $name, 'name' => $name,
'class' => 'group-request',
'renderer' => 'oneline', 'renderer' => 'oneline',
'successcallback' => 'group_invite_submit', 'successcallback' => 'group_invite_submit',
'elements' => array( 'elements' => array(
'accept' => array( 'accept' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-primary btn-xs',
'value' => get_string('acceptinvitegroup', 'group') 'value' => get_string('acceptinvitegroup', 'group')
), ),
'decline' => array( 'decline' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-default btn-xs',
'value' => get_string('declineinvitegroup', 'group') 'value' => get_string('declineinvitegroup', 'group')
), ),
'group' => array( 'group' => array(
......
...@@ -1467,7 +1467,7 @@ EOF; ...@@ -1467,7 +1467,7 @@ EOF;
} }
if (!empty($element['hiddenlabel'])) { if (!empty($element['hiddenlabel'])) {
$labelclass = ' class="accessible-hidden sr-only"'; $labelclass = ' class="sr-only"';
} }
else { else {
$labelclass = ''; $labelclass = '';
......
...@@ -2107,7 +2107,7 @@ function acceptfriend_form($friendid) { ...@@ -2107,7 +2107,7 @@ function acceptfriend_form($friendid) {
'elements' => array( 'elements' => array(
'acceptfriend_submit' => array( 'acceptfriend_submit' => array(
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-success', 'class' => 'btn btn-success btn-sm',
'value' => get_string('approverequest', 'group'), 'value' => get_string('approverequest', 'group'),
), ),
'id' => array( 'id' => array(
......
<div class="group-info"> <!-- <div class="group-info"> commented out at the moment as it's uncessary-->
{include file="group/info.tpl"} {include file="group/info.tpl"}
</div> <!-- </div> -->
<div class="friends"> <div class="friends">
{if $groupmembers} {if $groupmembers}
{$groupmembers.tablerows|safe} {$groupmembers.tablerows|safe}
{/if} {/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> </div>
{foreach from=$groupmembers item=groupmember} <div class="friendcell panel-body">
<div class="{cycle values='d0,d1'} friendcell center"> <div class="row">
<a href="{profile_url($groupmember)}"> {foreach from=$groupmembers item=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}"> <div class="col-xs-6 col-md-3 userthumb">
</a> <a href="{profile_url($groupmember)}" class="thumbnail" height="130px">
<div class="membername"><a href="{profile_url($groupmember)}">{$groupmember|display_default_name|escape}</a></div> <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> </div>
{/foreach} {/foreach}
</div>
</div>
<div class="listgroup">
<!-- <div class="panel-body listing"> -->
{if $groupviews} {if $groupviews}
<div class="groupviewsection"> <div class="groupviewsection list-">
<h3 class="title">{str tag="groupviews" section="view"}</h3> <h3 class="title">{str tag="groupviews" section="view"}</h3>
<div id="groupviewlist" class="fullwidth listing"> <div id="groupviewlist" class="list-group">
{$groupviews.tablerows|safe} {$groupviews.tablerows|safe}
</div> </div>
{if $groupviews.pagination} {if $groupviews.pagination}
...@@ -19,13 +21,14 @@ ...@@ -19,13 +21,14 @@
{/if} {/if}
{if $sharedviews} {if $sharedviews}
<div class="groupviewsection"> <div class="groupviewsection listrow">
<h3 class="title">{str tag="viewssharedtogroup" section="view"}</h3> <h3 class="title">{str tag="viewssharedtogroup" section="view"}</h3>
<div id="sharedviewlist" class="fullwidth listing"> <div id="sharedviewlist" class="list-group">
{$sharedviews.tablerows|safe} {$sharedviews.tablerows|safe}
</div> </div>
{if $sharedviews.pagination} {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}
{if $sharedviews.pagination_js} {if $sharedviews.pagination_js}
<script> <script>
...@@ -40,9 +43,9 @@ ...@@ -40,9 +43,9 @@
{if $sharedcollections} {if $sharedcollections}
<div class="groupviewsection"> <div class="groupviewsection listrow">
<h3 class="title">{str tag="collectionssharedtogroup" section="collection"}</h3> <h3 class="title">{str tag="collectionssharedtogroup" section="collection"}</h3>
<div id="sharedcollectionlist" class="fullwidth listing"> <div id="sharedcollectionlist" class="list-group">
{$sharedcollections.tablerows|safe} {$sharedcollections.tablerows|safe}
</div> </div>
{if $sharedcollections.pagination} {if $sharedcollections.pagination}
...@@ -61,11 +64,11 @@ ...@@ -61,11 +64,11 @@
{if $mysubmitted || $group_view_submission_form} {if $mysubmitted || $group_view_submission_form}
<div class="groupviewsection"> <div class="groupviewsection listrow">
{if $group_view_submission_form} {if $group_view_submission_form}
<h3 class="title">{str tag="submittogroup" section="view"}</h3> <h3 class="title">{str tag="submittogroup" section="view"}</h3>
{/if} {/if}
<div class="fullwidth listing"> <div class="list-group">
{if $mysubmitted} {if $mysubmitted}
{foreach from=$mysubmitted item=item} {foreach from=$mysubmitted item=item}
<div class="{cycle values='r0,r1'} submittedform"> <div class="{cycle values='r0,r1'} submittedform">
...@@ -87,9 +90,9 @@ ...@@ -87,9 +90,9 @@
{/if} {/if}
{if $allsubmitted} {if $allsubmitted}
<div class="groupviewsection"> <div class="groupviewsection listrow">
<h3 class="title">{str tag="submissionstogroup" section="view"}</h3> <h3 class="title">{str tag="submissionstogroup" section="view"}</h3>
<div id="allsubmissionlist" class="fullwidth listing"> <div id="allsubmissionlist" class="fullwidth">
{$allsubmitted.tablerows|safe} {$allsubmitted.tablerows|safe}
</div> </div>
{if $allsubmitted.pagination} {if $allsubmitted.pagination}
...@@ -105,3 +108,4 @@ ...@@ -105,3 +108,4 @@
{/if} {/if}
</div> </div>
{/if} {/if}
</div>
{foreach from=$items item=view} {foreach from=$items item=view}
<div class="{cycle values='r0,r1'} listrow"> <div class="{cycle values='r0,r1'} list-group-item">
{if $view.template} {if $view.template}
<div class="s fr">{$view.form|safe}</div> <div class="">{$view.form|safe}</div>
{/if} {/if}
<h4 class="title"><a href="{$view.fullurl}">{$view.title}</a> <h4 class="title">
<a href="{$view.fullurl}">
{$view.title}
</a>
</h4> </h4>
<div class="detail">{$view.description|str_shorten_html:100:true|strip_tags|safe}</div> <div class="detail">
{if $view.tags} {$view.description|str_shorten_html:100:true|strip_tags|safe}
<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$view.owner tags=$view.tags}</div> </div>
{/if} {if $view.tags}
<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$view.owner tags=$view.tags}</div>
{/if}
</div> </div>
{/foreach} {/foreach}
{foreach from=$items item=item} {foreach from=$items item=item}
<div class="{cycle values='r0,r1'} listrow"> <div class="listrow">
<h3 class="title"><a href="{group_homepage_url($item)}">{$item->name}</a><span class="roledisplay"> - {$item->roledisplay}</span></h3> <h3 class="title"><a href="{group_homepage_url($item)}">{$item->name}</a><span class="roledisplay"> - {$item->roledisplay}</span></h3>
{if $item->description} {if $item->description}
<div class="details">{$item->description|str_shorten_html:100:true|safe}</div> <div class="details">
{/if} {$item->description|str_shorten_html:100:true|safe}
</div> </div>
{/if}
</div>
{/foreach} {/foreach}
\ No newline at end of file
{if $foruminfo} {if $foruminfo}
<table class="fullwidth" id="latestforumposts"> <table class="fullwidth table panel-body" id="latestforumposts">
{foreach from=$foruminfo item=postinfo} {foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}"> <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> <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> <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 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> </td>
</tr> </tr>
{/foreach} {/foreach}
</table> </table>
{else} {else}
<table class="fullwidth"><tr class="{cycle values='r0,r1'}"> <table class="fullwidth table panel-body"><tr class="{cycle values='r0,r1'}">
<td align="center">{str tag=noforumpostsyet section=interaction.forum}</td> <td align="center">{str tag=noforumpostsyet section=interaction.forum}</td>
</tr> </tr>
</table> </table>
{/if} {/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> <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"> <div id="recentforumpostsblock">
{if $foruminfo} {if $foruminfo}
<table class="fullwidth"> <table class="fullwidth">
{foreach from=$foruminfo item=postinfo} {foreach from=$foruminfo item=postinfo}
<tr class="{cycle values='r0,r1'}"> <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> <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> <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> <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> </tr>
{/foreach} {/foreach}
</table> </table>
{else} {else}
<table class="fullwidth"><tr class="{cycle values='r0,r1'}"> <table class="fullwidth"><tr class="{cycle values='r0,r1'}">
<td align="center">{str tag=noforumpostsyet section=interaction.forum}</td> <td align="center">{str tag=noforumpostsyet section=interaction.forum}</td>
</tr> </tr>
</table> </table>
{/if} {/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="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 class="cb"></div>
</div> </div>
...@@ -246,6 +246,13 @@ select { ...@@ -246,6 +246,13 @@ select {
} }
} }
.form-group-inline {
&.select,
&.text {
margin-right: 10px;
}
}
.wysiwyg label, .wysiwyg label,
.textarea label { .textarea label {
vertical-align: top; vertical-align: top;
......
...@@ -3,34 +3,58 @@ ...@@ -3,34 +3,58 @@
.listing { .listing {
.listrow { .listrow {
@include clearfix; @include clearfix;
padding: 10px; padding: 15px;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
&:first-child { &:first-child {
border-top: none; border-top: none;
} }
.user-icon {
display: inline-block;
width: 30px;
}
.title { .title {
display: inline-block;
font-size: $font-size-large; font-size: $font-size-large;
margin: 0; margin: 0;
} }
.list-element-detail { .list-element-detail {
font-size: $font-size-small; font-size: $font-size-small;
padding-top: 5px; padding-top: 5px;
} }
.detail { .detail {
@extend .list-element-detail;
clear: both; clear: both;
font-size: $font-size-small;
} }
.content {
.groupsdetails { margin-top: 10px;
@extend .list-element-detail; padding-left: 0;
clear: left; @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; margin: 5px -15px 0;
li a { li a {
font-size: 0.9em; font-size: 0.9em;
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
width: 97%; width: 97%;
} }
} }
&.pending {
.panel-footer {
background-color: #ffffff;
}
}
} }
} }
...@@ -111,7 +116,9 @@ a.panel-footer { ...@@ -111,7 +116,9 @@ a.panel-footer {
clear:both; clear:both;
margin: 15px -15px -16px; //alter padding for panel footers inside panel-body (needed for some forms) margin: 15px -15px -16px; //alter padding for panel footers inside panel-body (needed for some forms)
} }
.userthumb {
height: 133px;
}
} }
.collapsible legend h4, .collapsible legend h4,
...@@ -272,4 +279,8 @@ a.panel-footer { ...@@ -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"} {include file="header.tpl"}
{if $candeleteself} {if $candeleteself}
<div class="message deletemessage"> <div class="deletemessage">
<div class="deletebuttonwrap"> <div class="deletebuttonwrap">
<a href="{$WWWROOT}account/delete.php" class="btn btn-success delete"> <a href="{$WWWROOT}account/delete.php" class="btn btn-success delete">
{str tag=deleteaccount section=account} {str tag=deleteaccount section=account}
......
...@@ -6,21 +6,21 @@ ...@@ -6,21 +6,21 @@
<p>{str tag=nogroups section=group}</p> <p>{str tag=nogroups section=group}</p>
{else} {else}
<div class="fullwidth center"> <div class="fullwidth center">
{foreach from=$data key=addtype item=groups} {foreach from=$data key=addtype item=groups}
{if $groups} {if $groups}
<div class="fl jointype"> <div class="fl jointype">
<h3>{if $addtype == 'add'}{str tag=addmembers section=group}{else}{str tag=invite section=group}{/if}</h3> <h3>{if $addtype == 'add'}{str tag=addmembers section=group}{else}{str tag=invite section=group}{/if}</h3>
<ul> <ul>
{foreach from=$groups item=group} {foreach from=$groups item=group}
<li> <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} <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> </li>
{/foreach} {/foreach}
<li class="last"><a class="btn" href="" onclick="changemembership(event, {$userid}, '{$addtype}');">{str tag=applychanges}</a></li> <li class="last"><a class="btn" href="" onclick="changemembership(event, {$userid}, '{$addtype}');">{str tag=applychanges}</a></li>
{/if} {/if}
</ul> </ul>
</div> </div>
{/foreach} {/foreach}
</div> </div>
{/if} {/if}
<div class="cb"></div> <div class="cb"></div>
......
{include file="header.tpl"} {include file="header.tpl"}
<div class="ptl pbl">
{$form|safe} {$form|safe}
{if $groups}<div id="findgroups" class="fullwidth listing">