Commit 629a64e6 authored by Naomi Guyer's avatar Naomi Guyer Committed by Aaron Wells
Browse files

NEW submenu for tertiary navigation

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I7196464441c27c657820742b2d310de4fb409b2d
parent 63a997cd
......@@ -86,8 +86,8 @@ else if ($moderator) {
array($forumid, $forum->groupid, 'forum', $userid)
);
}
$ineditwindow = group_within_edit_window($group);
if (!$ineditwindow) {
$moderator = false;
}
......@@ -176,7 +176,7 @@ if ($membership) {
'plugintype' => 'interaction',
'pluginname' => 'forum',
'autofocus' => false,
'class' => 'form-as-button',
'class' => 'form-as-button pull-left',
'elements' => array(
'submit' => array(
'type' => 'button',
......@@ -295,6 +295,7 @@ if ($publicgroup) {
$smarty = smarty(array(), $headers, array(), array());
$smarty->assign('heading', $forum->groupname);
$smarty->assign('subsectionheading', get_string('nameplural', 'interaction.forum'));
$smarty->assign('subheading', $forum->title);
$smarty->assign('headingclass', 'page-header');
$smarty->assign('forum', $forum);
......@@ -309,8 +310,8 @@ $smarty->assign('groupadmins', group_get_admin_ids($forum->groupid));
$smarty->assign('stickytopics', $stickytopics);
$smarty->assign('regulartopics', $regulartopics);
$smarty->assign('moderators', $moderators);
$smarty->assign('closedicon', $THEME->get_image_url('locked'));
$smarty->assign('subscribedicon', $THEME->get_image_url('subscribed'));
$smarty->assign('closedicon', 'fa fa-lock-alt');
$smarty->assign('subscribedicon', 'fa fa-star');
$smarty->assign('pagination', $pagination['html']);
$smarty->assign('INLINEJAVASCRIPT', $inlinejavascript);
$smarty->display('interaction:forum:view.tpl');
......
......@@ -4405,21 +4405,21 @@ function display_icon($type, $id = false) {
case 'success':
case 'true':
case 'enabled':
$image = 'success';
$image = 'fa fa-lg fa-check text-success';
break;
case 'off':
case 'no':
case 'fail':
case 'false':
case 'disabled':
$image = 'fail';
$image = 'fa fa-lg fa-times text-danger';
break;
}
$imageurl = $THEME->get_image_url($image);
$html = '<img src="' . $imageurl . '" class="displayicon" alt="' . get_string($type) . '"';
$html = '<span class="' . $image . '" class="displayicon" title="' . get_string($type) . '"';
if ($id) {
$html .= ' id="' . $id . '"';
}
$html .= '>';
$html .= '> </span>';
return $html;
}
{include file="header.tpl"}
<a title="{str section='artefact.multirecipientnotification' tag='composemessagedesc'}" class="btn btn-default compose btn-lg" href="{$WWWROOT}artefact/multirecipientnotification/sendmessage.php">
<a title="{str section='artefact.multirecipientnotification' tag='composemessagedesc'}" class="btn-with-heading btn-lg btn btn-default" href="{$WWWROOT}artefact/multirecipientnotification/sendmessage.php">
<span class="fa fa-edit"></span>
{str section='artefact.multirecipientnotification' tag='composemessage'}
</a>
......@@ -32,7 +32,7 @@
</a>
</div>
</div>
<form class="form-notificationlist pbl ptl" name="notificationlist" method="post">
<div id="activitylist" class="notification-list"{if $paginatorData } data-paginator='{$paginatorData}'{/if}>
{$activitylist['html']|safe}
......
......@@ -9,115 +9,114 @@
</div>
{/if}
<h2 class="pbl mbl">
{str tag="nameplural" section=interaction.forum}
{if $publicgroup}
<a href="{$feedlink}">
<span class="fa-rss fa"></span>
</a>
{/if}
</h2>
<div class="row">
<div class="col-md-12 mtxl">
{if $forums}
<div id="view-forum" class="table-responsive">
<table id="forums-list" class="table fullwidth table-striped table-padded">
<thead>
<tr>
<th>
{str tag="name" section="interaction.forum"}
</th>
<th class="text-center">
{str tag="Topics" section="interaction.forum"}
</th>
<th class="subscribeth">
<span class="accessible-hidden sr-only">
{str tag=Subscribe section=interaction.forum}
</span>
</th>
<th class="control-buttons">
<span class="accessible-hidden sr-only">
{str tag=edit}
</span>
</th>
</tr>
</thead>
<tbody>
{foreach from=$forums item=forum}
<tr class="{cycle values='r0,r1'}">
<td>
<h3 class="title">
<a href="{$WWWROOT}interaction/forum/view.php?id={$forum->id}">
{$forum->title}
</a>
{if $forums}
<div id="view-forum" class="table-responsive">
<table id="forums-list" class="table fullwidth nohead">
<tr>
<th>
{str tag="name" section="interaction.forum"}
</th>
<th class="text-center">
{str tag="Topics" section="interaction.forum"}
</th>
<th class="subscribeth">
<span class="accessible-hidden sr-only">
{str tag=Subscribe section=interaction.forum}
</span>
</th>
<th class="control-buttons">
<span class="accessible-hidden sr-only">
{str tag=edit}
</span>
</th>
</tr>
{foreach from=$forums item=forum}
<tr class="{cycle values='r0,r1'}">
<td>
<h3 class="title">
<a href="{$WWWROOT}interaction/forum/view.php?id={$forum->id}">
{$forum->title}
</a>
{if $publicgroup}
<a href="{$forum->feedlink}">
<span class="fa-rss fa"></span>
</a>
{/if}
</h3>
<div class="detail text-small pts">
{$forum->description|str_shorten_html:1000:true|safe}
</div>
{if $forum->moderators}
<div class="inlinelist">
<span>
{str tag="Moderators" section="interaction.forum"}:
</span>
{foreach from=$forum->moderators item=mod}
<a href="{profile_url($mod)}">
<img src="{profile_icon_url user=$mod maxwidth=20 maxheight=20}" alt="{str tag=profileimagetext arg1=$mod|display_default_name}">
</a>
<a href="{profile_url($mod)}" class="moderator">
{$mod|display_name:null:true}
</a>
{/foreach}
</div>
{/if}
</td>
<td class="text-center">
{$forum->topiccount}
</td>
<td class="subscribetd">
{if $forum->subscribe}
{$forum->subscribe|safe}
{/if}
</td>
<td class="right control-buttons">
<div class="btn-group">
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id}&amp;returnto=index" class="icon btn btn-default btn-xs" title="{str tag=edit}">
<span class="fa fa-pencil"></span>
<span class="sr-only">{str tag=editspecific arg1=$forum->title}</span>
</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id}&amp;returnto=index" class="icon btn btn-default btn-xs" title="{str tag=delete}">
<span class="text-danger fa fa-trash"></span>
<span class="sr-only">{str tag=deletespecific arg1=$forum->title}</span>
{if $publicgroup}
<a href="{$forum->feedlink}">
<span class="fa-rss fa fa-sm pls text-orange"></span>
</a>
{/if}
</h3>
<div class="detail text-small pts">
{$forum->description|str_shorten_html:1000:true|safe}
</div>
{if $forum->moderators}
<div class="inlinelist">
<span>
{str tag="Moderators" section="interaction.forum"}:
</span>
{foreach from=$forum->moderators item=mod}
<a href="{profile_url($mod)}">
<img src="{profile_icon_url user=$mod maxwidth=20 maxheight=20}" alt="{str tag=profileimagetext arg1=$mod|display_default_name}">
</a>
<a href="{profile_url($mod)}" class="moderator">
{$mod|display_name:null:true}
</a>
{/foreach}
</div>
{/if}
</td>
<td class="text-center">
{$forum->topiccount}
</td>
<td class="subscribetd">
{if $forum->subscribe}
{$forum->subscribe|safe}
{/if}
</td>
<td class="right control-buttons">
<div class="btn-group">
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id}&amp;returnto=index" class="icon btn btn-default btn-xs" title="{str tag=edit}">
<span class="fa fa-pencil"></span>
<span class="sr-only">{str tag=editspecific arg1=$forum->title}</span>
</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id}&amp;returnto=index" class="icon btn btn-default btn-xs" title="{str tag=delete}">
<span class="text-danger fa fa-trash"></span>
<span class="sr-only">{str tag=deletespecific arg1=$forum->title}</span>
</a>
</div>
</td>
</tr>
{/foreach}
<tbody>
</table>
</div>
{else}
<div class="message">
{str tag=noforums section=interaction.forum}
</div>
{/if}
<div class="forummods">
<p class="lead text-small">
{str tag="groupadminlist" section="interaction.forum"}
</p>
{foreach from=$groupadmins item=groupadmin}
<a href="{profile_url($groupadmin)}" class="label label-default">
<img src="{profile_icon_url user=$groupadmin maxheight=20 maxwidth=20}" alt="{str tag=profileimagetext arg1=$groupadmin|display_default_name}" class="user-icon-alt"> {$groupadmin|display_name}
</a>
</div>
</td>
</tr>
{/foreach}
</table>
</div>
{else}
<div class="message">
{str tag=noforums section=interaction.forum}
</div>
{/if}
<div class="forummods">
<p class="lead text-small">
{str tag="groupadminlist" section="interaction.forum"}
</p>
{foreach from=$groupadmins item=groupadmin}
<a href="{profile_url($groupadmin)}" class="label label-default">
<img src="{profile_icon_url user=$groupadmin maxheight=20 maxwidth=20}" alt="{str tag=profileimagetext arg1=$groupadmin|display_default_name}" class="user-icon-alt"> {$groupadmin|display_name}
</a>
{/foreach}
{/foreach}
</div>
</div>
</div>
{include file="footer.tpl"}
{include file="header.tpl"}
<h2 class="pbl mbl">
{str tag=nameplural section=interaction.forum} &gt;
<a href="{$WWWROOT}interaction/forum/view.php?id={$topic->forumid}">
{$topic->forumtitle}
</a>
</h2>
{if $membership}
<div id="forumbtns" class="text-right btn-top-right">
<div id="forumbtns" class="btn-top-right btn-group btn-group-top">
{if !$topic->forumsubscribed}
{$topic->subscribe|safe}
{/if}
{if $topic->canedit}
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id}" class="btn btn-default editforum">
<span class="fa fa-pencil"></span>
{str tag=edittopic section=interaction.forum}
</a>
{if $moderator}
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id}" class="btn btn-danger deletetopic">
<span class="fa fa-trash"></span>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id}" class="btn btn-default deletetopic">
<span class="fa fa-trash prs text-danger"></span>
{str tag=deletetopic section=interaction.forum}
</a>
{/if}
{/if}
{if !$topic->forumsubscribed}
{$topic->subscribe|safe}
{/if}
</div>
{/if}
<h3>{$topic->subject}</h3>
<h2 class="ptxl pbm">
<span class="lead text-small mbs inline ptl">
<a href="{$WWWROOT}interaction/forum/view.php?id={$topic->forumid}">
{$topic->forumtitle}
</a> /
</span>
<br />
{$topic->subject}
</h2>
<hr class="mbxl" />
{if $topic->closed}
<div class="message closed">
{str tag=topicisclosed section=interaction.forum}
......@@ -61,4 +67,3 @@
{$pagination|safe}
</div>
{include file="footer.tpl"}
......@@ -9,56 +9,64 @@
{else}
<tr class="{$objectionableclass}">
{/if}
<td class="narrow center">
{if $topic->closed}
<span class="fa fa-lock"></span>
<span class="sr-only">{str tag="Closed" section="interaction.forum"}</span>
{/if}
{if $topic->subscribed}
<span class="fa fa-bookmark"></span>
<span class="sr-only">{str tag="Subscribed" section="interaction.forum"}</span>
{/if}
</td>
<td class="narrow">
{if $membership && (!$forum->subscribed || $moderator)}
<input type="checkbox" name="checked[{$topic->id}]" class="topic-checkbox">
<input type="checkbox" name="checked[{$topic->id}]" class="topic-checkbox mtl">
{/if}
</td>
<td class="topic">
<h3 class="title">
<div class="inline">
{if $topic->closed}
<span class="fa fa-lock fa-lg prs"></span>
<span class="sr-only">{str tag="Closed" section="interaction.forum"}</span>
{/if}
{if $topic->subscribed}
<span class="fa fa-star fa-lg prs text-success"></span>
<span class="sr-only">{str tag="Subscribed" section="interaction.forum"}</span>
{/if}
</div>
<h3 class="title inline">
<a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}">
{$topic->subject}
</a>
{if $publicgroup}
<a href="{$topic->feedlink}">
<span class="fa-rss fa"></span>
</a>
{/if}
<span class="metadata text-small">
{str tag=by section=view}
<a href="{profile_url($topic->poster)}" class="forumuser{if in_array($topic->poster, $groupadmins)} groupadmin{elseif $topic->moderator} moderator{/if}">
{$topic->poster|display_name:null:true}
</a>
</span>
</h3>
<div class="detail text-small mts">
{$topic->body|str_shorten_html:50:true:false|safe}
<div class="text-small threaddetails mtm">
<p>{$topic->body|str_shorten_html:50:true:false|safe}</p>
</div>
</td>
<td class="postertd">
<a href="{profile_url($topic->poster)}" class="forumuser{if in_array($topic->poster, $groupadmins)} groupadmin{elseif $topic->moderator} moderator{/if}">{$topic->poster|display_name:null:true}
</a>
</td>
<td class="postscount text-center">
{$topic->postcount}
</td>
<td class="lastposttd">
<td class="lastposttd metadata">
{if !$topic->lastpostdeleted}
<a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}&post{$topic->lastpost}">
{$topic->lastposttime}
</a>
{str tag=by section=view}
<a href="{profile_url($topic->lastposter)}" {if in_array($topic->lastposter, $groupadmins)} class="groupadmin"{elseif $topic->lastpostermoderator} class="moderator"{/if}>{$topic->lastposter|display_name:null:true}
</a>
{if $publicgroup}
<a href="{$topic->feedlink}" class="pls">
<span class="fa-rss fa text-orange"></span>
</a>
{/if}
<p>
{str tag=by section=view}
<a href="{profile_url($topic->lastposter)}" {if in_array($topic->lastposter, $groupadmins)} class="groupadmin"{elseif $topic->lastpostermoderator} class="moderator"{/if}>{$topic->lastposter|display_name:null:true}
</a>
{/if}
</p>
</td>
{if $moderator}
<td class="control-buttons">
{if $moderator}
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id}&amp;returnto=view" class="btn btn-default btn-xs" title="{str tag="edit"}">
<span class="fa fa-pencil"></span>
<span class="sr-only">
......
......@@ -4,122 +4,120 @@
{if $membership}
{$forum->subscribe|safe}
{/if}
{if $membership && ($moderator || ($forum->newtopicusers != 'moderators') && $ineditwindow) }
<a href="{$WWWROOT}interaction/forum/edittopic.php?forum={$forum->id}" class="btn btn-default newforumtopic">
<span class="fa fa-plus fa-lg prs text-primary"></span>
{str tag="newtopic" section="interaction.forum"}
</a>
{if $admin}
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id}" class="btn btn-default editforumtitle">
<span class="fa fa-cog"></span>
{str tag="edittitle" section="interaction.forum"}
</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id}" class="btn btn-default deleteforum">
<span class="fa fa-trash text-danger"></span>
{str tag="deleteforum" section="interaction.forum"}
</a>
{/if}
{/if}
</div>
<h2 class="ptl">
{str tag=nameplural section=interaction.forum} &gt;
{$subheading}
<h2 class="ptxl pbm">
<span class="lead text-small mbs inline ptl">
<a href="{$WWWROOT}interaction/forum/index.php?group={$forum->groupid}">
{str tag=nameplural section=interaction.forum}
</a> /
</span>
<br />
{$subheading}
{if $publicgroup}
<a href="{$feedlink}">
<span class="fa-rss fa"></span>
<span class="fa-rss fa-sm fa pls text-orange"></span>
</a>
{/if}
</h2>
<hr class="mbl" />
<div id="forum-description" class="lead pbl">
{$forum->description|clean_html|safe}
</div>
<div id="viewforum">
<h3 class="pbl mbl">
{str tag=Topics section="interaction.forum"}
</h3>
{if $membership && ($moderator || ($forum->newtopicusers != 'moderators') && $ineditwindow) }
<div class="text-right btn-top-right">
<div class="btn-group">
<a href="{$WWWROOT}interaction/forum/edittopic.php?forum={$forum->id}" class="btn btn-default newforumtopic">
<span class="fa fa-plus fa-lg prs text-primary"></span>
{str tag="newtopic" section="interaction.forum"}
</a>
{if $admin}
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id}" class="btn btn-default editforumtitle">
<span class="fa fa-cog"></span>
{str tag="edittitle" section="interaction.forum"}
</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id}" class="btn btn-default deleteforum">
<span class="fa fa-trash text-danger"></span>
{str tag="deleteforum" section="interaction.forum"}
</a>
{/if}
</div>
</div>
{/if}
{if $stickytopics || $regulartopics}
<form action="" method="post">
<table id="forumtopicstable" class="table fullwidth">
<form action="" method="post" class="mtxl">
<table id="forumtopicstable" class="table fullwidth table-striped table-padded">
<thead>
<tr>
<th class="narrow"></th>
<th class="narrow"></th>
<th class="topic">{str tag="Topic" section="interaction.forum"}</th>
<th class="posterth">{str tag="Poster" section="interaction.forum"}</th>
<th class="postscount center">{str tag="Posts" section="interaction.forum"}</th>
<th class="postscount text-center">{str tag="Posts" section="interaction.forum"}</th>
<th class="lastpost">{str tag="lastpost" section="interaction.forum"}</th>
{if $moderator}<th class="right btns2"></th>{/if}
</tr>
</thead>
{if $stickytopics}
{include file="interaction:forum:topics.tpl" topics=$stickytopics moderator=$moderator forum=$forum publicgroup=$publicgroup sticky=true}
{/if}
{if $regulartopics}
{include file="interaction:forum:topics.tpl" topics=$regulartopics moderator=$moderator forum=$forum publicgroup=$publicgroup sticky=false}
{/if}
</table>
{if $regulartopics}
<div>
{$pagination|safe}
</div>
{/if}
{if $membership && (!$forum->subscribed || $moderator)}
<div class="forumselectwrap form-inline ptl">
<select name="type" id="action">
<option value="default" selected="selected">
{str tag="chooseanaction" section