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

Comments on page view (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: I2fbc8593a97edf9721edb40fe2ecc0561c98c15b
parent 91927381
......@@ -3775,7 +3775,7 @@ function build_pagination($params) {
}
// Begin building the output
$output = '<div id="' . $params['id'] . '" class="pagination-wrapper';
$output = '<div id="' . $params['id'] . '" class="pagination-wrapper ptl';
if (isset($params['class'])) {
$output .= ' ' . hsc($params['class']);
}
......
......@@ -49,7 +49,7 @@ $form = pieform(array(
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'class' => 'btn btn-success',
'class' => 'btn btn-default',
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . $goto,
)
......
......@@ -37,7 +37,7 @@ $form = pieform(array(
'name' => 'filter',
'method' => 'post',
'renderer' => 'div',
'class' => 'form-inline',
'class' => 'form-inline ptl pbl',
'elements' => array(
'inputgroup' => array(
'type' => 'fieldset',
......
......@@ -4,15 +4,23 @@
<div id="blogpost-{$postid}" class="panel-body">
{if $artefacttitle}<h3 class="title">{$artefacttitle|safe}</h3>{/if}
<div class="postdetails metadata mbm">{$postedbyon}</div>
{$artefactdescription|clean_html|safe}
<div class="postdetails metadata mbm">
<span class="fa fa-calendar mrs"></span>
{$postedbyon}
</div>
{if $artefact->get('tags')}<div class="tags">{str tag=tags}: {list_tags owner=$artefact->get('owner') tags=$artefact->get('tags')}</div>{/if}
{if $artefact->get('tags')}
<div class="tags metadata">
<span class="fa fa-tags"></span>
<strong>{str tag=tags}:</strong>
{list_tags owner=$artefact->get('owner') tags=$artefact->get('tags')}
</div>
{/if}
{$artefactdescription|clean_html|safe}
{if $license}
<div class="postlicense">
<div class="postlicense mtm mbl">
{$license|safe}
</div>
{/if}
......
{foreach from=$posts item=post}
<div class="post ptm pbm">
<div class="post ptm mbxl">
<h4 class="title">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{$post->title}</a>
</h4>
......@@ -53,19 +53,21 @@
{/if}
{if $options.viewid && ($post->commentcount || $post->commentcount === 0)}
<div class="comments">
<div class="comments clearfix ptm mts">
{if $post->commentcount > 0}
<a id="block_0{$post->id}{$options.blockid}" class="commentlink" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{str tag=Comments section=artefact.comment} ({$post->commentcount})</a>
<a id="block_0{$post->id}{$options.blockid}" class="commentlink text-thin pull-left" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">{str tag=Comments section=artefact.comment} ({$post->commentcount})</a>
{else}
{if $allowcomments}
<span class="nocomments">{str tag=Comments section=artefact.comment} ({$post->commentcount})</span>
<span class="nocomments text-thin pull-left">{str tag=Comments section=artefact.comment} ({$post->commentcount})</span>
{/if}
{if $post->allowcomments}
<p class="text-right">
<a class="addcomment text-thin" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">
<span class="fa fa-lg fa-plus text-primary prs"></span>
{str tag=addcomment section=artefact.comment}
</a>
</p>
{/if}
{/if}
{if $post->allowcomments}
<a class="mtl mbl btn btn-default btn-sm btn-block addcomment" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">
<span class="fa fa-lg fa-plus text-primary prs"></span>
{str tag=addcomment section=artefact.comment}
</a>
{/if}
</div>
{/if}
......
<div class="text-center imageblock panel-body" itemscope itemtype="http://schema.org/ImageObject">
<div class="imageblock panel-body" itemscope itemtype="http://schema.org/ImageObject">
<div class="image">
<a href="{$url}">
<img src="{$src}" alt="{$description}" itemprop="contentURL">
......@@ -10,8 +10,7 @@
{$description}
</div>
{/if}
{if $commentcount || $commentcount === 0}
{$comments|safe}
{/if}
</div>
{if $commentcount || $commentcount === 0}
{$comments|safe}
{/if}
{include file="header.tpl"}
<div class="deletemessage">
<h2>{$subheading}</h2>
<p class="lead text-small">{$message}</p>
<p class="lead">{$message}</p>
{$form|safe}
</div>
{include file="footer.tpl"}
......@@ -121,7 +121,7 @@
{/foreach}
{/if}
{if $group_view_submission_form}
<li class="list-group-item text-small list-group-item-default">
<li class="list-group-item list-group-item-default">
<div class="submissionform">
{$group_view_submission_form|safe}
</div>
......
{include file="header.tpl"}
<h2>{$subheading}</h2>
<div class="message deletemessage">{$deleteform|safe}</div>
<div class="message deletemessage">
{$deleteform|safe}
</div>
{include file="interaction:forum:simplepost.tpl" post=$topic groupadmins=$groupadmins}
{include file="footer.tpl"}
......@@ -38,9 +38,14 @@
</span>
</h3>
<div class="text-small threaddetails mtm">
<p>{$topic->body|str_shorten_html:50:true:false|safe}</p>
{if $publicgroup}
<a href="{$topic->feedlink}">
<span class="fa fa-rss"></span>
</a>
{/if}
</h3>
<div class="detail text-small mts">
{$topic->body|str_shorten_html:80:true:false|safe}
</div>
</td>
<td class="postscount text-center">
......@@ -66,19 +71,20 @@
</td>
<td class="control-buttons">
{if $moderator}
<div class="btn-group">
<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">
{str tag=edittopicspecific section=interaction.forum arg1=$topic->subject}
</span>
</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id}&amp;returnto=view" class="btn btn-danger btn-xs" title="{str tag="delete"}">
<span class="fa fa-trash"></span>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id}&amp;returnto=view" class="btn btn-default btn-xs" title="{str tag="delete"}">
<span class="fa fa-trash text-danger"></span>
<span class="sr-only">
{str tag=deletetopicspecific section=interaction.forum arg1=$topic->subject}
</span>
</a>
</div>
</td>
{/if}
</tr>
......
......@@ -47,6 +47,7 @@
</div>
<div id="viewforum">
<<<<<<< HEAD
{if $stickytopics || $regulartopics}
<form action="" method="post" class="mtxl">
......@@ -61,6 +62,46 @@
</tr>
</thead>
=======
<h3 class="pull-left">
{str tag=Topics section="interaction.forum"}
</h3>
{if $membership && ($moderator || ($forum->newtopicusers != 'moderators') && $ineditwindow) }
<div class="btn-top-right ptl pbxl text-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" class="ptxl">
<table id="forumtopicstable" class="table fullwidth">
<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="lastpost">{str tag="lastpost" section="interaction.forum"}</th>
{if $moderator}<th class="right btns2"></th>{/if}
</tr>
>>>>>>> Comments on page view (bootstrap)
{if $stickytopics}
{include file="interaction:forum:topics.tpl" topics=$stickytopics moderator=$moderator forum=$forum publicgroup=$publicgroup sticky=true}
{/if}
......@@ -78,6 +119,7 @@
{if $membership && (!$forum->subscribed || $moderator)}
<div class="forumselectwrap form-inline ptl">
<<<<<<< HEAD
<select name="type" id="action">
<option value="default" selected="selected">
{str tag="chooseanaction" section="interaction.forum"}
......@@ -131,6 +173,64 @@
<button type="submit" name="updatetopics" class="btn btn-success">
{str tag="updateselectedtopics" section="interaction.forum"}
</button>
=======
<div class="input-group">
<select name="type" id="action">
<option value="default" selected="selected">
{str tag="chooseanaction" section="interaction.forum"}
</option>
{if !$forum->subscribed}
<option value="subscribe">
{str tag="Subscribe" section="interaction.forum"}
</option>
<option value="unsubscribe">
{str tag="Unsubscribe" section="interaction.forum"}
</option>
{/if}
{if $moderator}
<option value="sticky">
{str tag="Sticky" section="interaction.forum"}
</option>
<option value="unsticky">
{str tag="Unsticky" section="interaction.forum"}
</option>
<option value="closed">
{str tag="Close" section="interaction.forum"}
</option>
<option value="open">
{str tag="Open" section="interaction.forum"}
</option>
{/if}
{if $moderator && $otherforums && (count($otherforums) > 0)}
<option value="moveto">
{str tag="Moveto" section="interaction.forum"}
</option>
{/if}
</select>
{if $moderator && $otherforums && (count($otherforums) > 0)}
<select name="newforum" id="otherforums" class="hidden">
{foreach from=$otherforums item=otherforum}
<option value="{$otherforum->id}">
{$otherforum->title}
</option>
{/foreach}
</select>
{/if}
<div class="input-group-btn">
<button type="submit" name="updatetopics" class="btn btn-success">
{str tag="updateselectedtopics" section="interaction.forum"}
</button>
</div>
</div>
>>>>>>> Comments on page view (bootstrap)
{if $moderator}
{contextualhelp plugintype='interaction' pluginname='forum' section='updatemod'}
......@@ -171,7 +271,7 @@
</div>
{else}
<div class="no-result pbl">
<div class="text-center lead no-result ptxl mtxl">
{str tag="notopics" section="interaction.forum"}
</div>
</div>
......
......@@ -179,6 +179,12 @@ label.sr-only + div.mce-tinymce {
width: 250px;
}
}
.form-group {
padding: 0;
}
.input-group {
max-width: 187px;
}
}
.form-createfolder {
......
......@@ -75,6 +75,10 @@ body {
}
}
.viewfooter {
clear: both;
}
// Needed to clear the float when dropzone is visible
.blocktype {
......
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