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

Commentlist (wip), refactor list-group (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework
FIX: remove btn class for submitcancel
Tweak resume blocks on page view (bootstrap)
Comment list WIP (bootstrap)

Change-Id: Id77524e7bdb03569920091d3b895359b24511644
parent 75f77523
......@@ -832,8 +832,8 @@ class ArtefactTypeComment extends ArtefactType {
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn btn-link btn-sm',
'value' => '<span class="icon icon-trash icon-lg text-danger"></span> <span class="sr-only">' . get_string('delete') . '</span>',
'class' => 'btn btn-link',
'value' => '<span class="icon icon-trash text-danger"></span> <span class="sr-only">' . get_string('delete') . '</span>',
'confirm' => get_string('reallydeletethiscomment', 'artefact.comment'),
'name' => 'delete_comment_submit',
),
......
......@@ -59,6 +59,7 @@ function pieform_renderer_div(Pieform $form, $element) {/*{{{*/
// remove form-control class and btn class (these should be on the element only)
$element['class'] = str_replace(" btn ", " ", $element['class']);
$element['class'] = str_replace("btn-", " ", $element['class']);
$element['class'] = str_replace("form-control ", "", $element['class']);
......
......@@ -14829,92 +14829,92 @@ a.label.label-default:hover, a.label.label-default:focus,
border: 0;
padding: 5px 7px;
}
/* line 38, ../../../raw/static/sass/components/_list-group.scss */
.list-group.list-group-lite .list-group-item {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
border-left: 0;
border-right: 0;
}
/* line 41, ../../../raw/static/sass/components/_list-group.scss */
/* line 45, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-heading {
font-family: "Roboto Slab", Georgia, "Times New Roman", Times, serif;
font-weight: 300;
}
/* line 45, ../../../raw/static/sass/components/_list-group.scss */
/* line 49, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-heading a:hover {
text-decoration: none;
color: #2d6da3;
}
/* line 48, ../../../raw/static/sass/components/_list-group.scss */
/* line 52, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-heading a:hover.inner-link {
text-decoration: underline;
}
/* line 51, ../../../raw/static/sass/components/_list-group.scss */
/* line 55, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-heading a:hover .metadata {
color: #2d6da3;
}
/* line 55, ../../../raw/static/sass/components/_list-group.scss */
/* line 59, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-heading a.collapsible {
display: block;
}
/* line 61, ../../../raw/static/sass/components/_list-group.scss */
/* line 65, ../../../raw/static/sass/components/_list-group.scss */
h4.list-group-item-heading {
font-size: 16px;
}
/* line 66, ../../../raw/static/sass/components/_list-group.scss */
/* line 70, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-warning .list-group-item-heading, .list-group-item.draft .list-group-item-heading {
color: #8a6d3b;
}
/* line 72, ../../../raw/static/sass/components/_list-group.scss */
/* line 76, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link {
padding: 0;
}
/* line 74, ../../../raw/static/sass/components/_list-group.scss */
/* line 78, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link a {
font-size: 0.9em;
display: block;
padding: 10px 15px;
color: #666;
}
/* line 79, ../../../raw/static/sass/components/_list-group.scss */
/* line 83, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link a:hover {
background: #ededed;
text-decoration: none;
color: #285f8f;
}
/* line 84, ../../../raw/static/sass/components/_list-group.scss */
/* line 88, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link a small {
color: #2d6da3;
}
/* line 87, ../../../raw/static/sass/components/_list-group.scss */
/* line 91, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link a .file-icon {
display: inline-block;
width: 22px;
height: 22px;
}
/* line 92, ../../../raw/static/sass/components/_list-group.scss */
/* line 96, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link a .file-title {
display: inline-block;
vertical-align: middle;
}
/* line 96, ../../../raw/static/sass/components/_list-group.scss */
/* line 100, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-link a .file-size {
float: right;
color: #868686;
}
/* line 109, ../../../raw/static/sass/components/_list-group.scss */
/* line 113, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item.published {
background: #fefefe;
}
/* line 112, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item.list-group-item-lite {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
border-left: 0;
border-right: 0;
}
@media (max-width: 768px) {
/* line 118, ../../../raw/static/sass/components/_list-group.scss */
/* line 117, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item .btn-title {
position: absolute;
width: 1px;
......@@ -14928,28 +14928,28 @@ h4.list-group-item-heading {
}
}
/* line 124, ../../../raw/static/sass/components/_list-group.scss */
/* line 123, ../../../raw/static/sass/components/_list-group.scss */
.list-group-item-default {
background-color: rgba(236, 236, 236, 0.5);
}
/* line 131, ../../../raw/static/sass/components/_list-group.scss */
/* line 130, ../../../raw/static/sass/components/_list-group.scss */
.panel > .block > .list-group {
margin-bottom: 0;
}
/* line 135, ../../../raw/static/sass/components/_list-group.scss */
/* line 134, ../../../raw/static/sass/components/_list-group.scss */
.panel > .block .list-group .list-group-item {
border-width: 1px 0;
border-radius: 0;
}
/* line 139, ../../../raw/static/sass/components/_list-group.scss */
/* line 138, ../../../raw/static/sass/components/_list-group.scss */
.panel > .block .list-group:last-child .list-group-item:last-child {
border-bottom: 0;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
}
/* line 148, ../../../raw/static/sass/components/_list-group.scss */
/* line 147, ../../../raw/static/sass/components/_list-group.scss */
.panel-heading + .block > .list-group .list-group-item:first-child {
border-top-width: 0;
}
......
{foreach from=$posts item=post}
<div id="posttitle_{$post->id}" class="{if $post->published} published{else} draft{/if} list-group-item list-group-item-lite">
<div id="posttitle_{$post->id}" class="{if $post->published} published{else} draft{/if} list-group-item">
<div class="clearfix ptm pbm">
<h2 class="list-group-item-heading pull-left mt0">
{$post->title}
......
......@@ -22,7 +22,7 @@
{/if}
{if $posts}
<div id="postlist" class="ptl">
<div id="postlist" class="ptl list-group list-group-lite">
{$posts.tablerows|safe}
</div>
<div id="blogpost_page_container" class="hidden">{$posts.pagination|safe}</div>
......
......@@ -3,7 +3,7 @@
<p class="metadata">{$editing}</p>
</div>
{elseif $feedback}
<div class="viewfooter table-responsive">
<div class="viewfooter">
<table id="feedbacktable" class="feedbacktable fullwidth table">
<tbody>
{$feedback->tablerows|safe}
......
<div class="list-group list-group-lite">
{foreach from=$data item=item}
<div class="panel panel-small {if $item->pubmessage}panel-warning{elseif $item->deletedmessage}panel-danger{else}panel-default{/if} {cycle name=rows values='r0,r1'}{if $item->highlight} highlight{/if}{if $item->makepublicform} private{/if}">
<div class="panel-heading has-link">
<h4>
<div class="list-group-item {if $item->pubmessage}list-group-item-warning{elseif $item->deletedmessage}deleted {/if} {cycle name=rows values='r0,r1'}">
<div class="comment-heading clearfix">
<span class="user-icon small-icon pull-left mls mts mrm">
{if $item->author}
<a href="{$item->author->profileurl}" class="userinfo has-user-icon">
<img src="{profile_icon_url user=$item->author maxheight=40 maxwidth=40}" valign="middle" alt="{str tag=profileimagetext arg1=$item->author|display_default_name}"/>
{else}
<img src="{profile_icon_url user=null maxheight=40 maxwidth=40}" valign="middle" alt="{str tag=profileimagetextanonymous}"/>
{/if}
</span>
<h5 class="pull-left mt">
{if $item->author}
<a href="{$item->author->profileurl}">
{/if}
<span class="user-icon small-icon left">
{if $item->author}
<img src="{profile_icon_url user=$item->author maxheight=40 maxwidth=40}" valign="middle" alt="{str tag=profileimagetext arg1=$item->author|display_default_name}" />
{else}
<img src="{profile_icon_url user=null maxheight=40 maxwidth=40}" alt="{str tag=profileimagetextanonymous}" />
{/if}
</span>
{if $item->author}
{$item->author|display_name}
<span>{$item->author|display_name}</span>
{/if}
<span class="postedon metadata">
- {$item->date} {if $item->updated}[{str tag=Updated}: {$item->updated}]{/if}
{if $item->pubmessage} - <em class="privatemessage"> {$item->pubmessage}</em>{/if}
</span>
{if $item->author}
</a>
{/if}
</h4>
{if !$onview}
<span class="panel-control panel-header-form-actions">
{if $item->deleteform}
{$item->deleteform|safe}
</a>
{/if}
{if $item->canedit}
<form class="form-as-button pull-left" name="edit_{$item->id}" action="{$WWWROOT}artefact/comment/edit.php">
<input type="hidden" name="id" value="{$item->id}">
<input type="hidden" name="view" value="{$viewid}">
<button class="btn btn-link btn-sm button">
<span class="icon icon-lg icon-pencil text-default"></span>
<span class="sr-only">{str tag=edit}</span>
</button>
</form>
<br />
<span class="postedon text-small">
{$item->date}
{if $item->updated}
[{str tag=Updated}: {$item->updated}]
{/if}
</span>
{/if}
</div>
<div class="comment panel-body">
{if $item->deletedmessage}
<span class="text-danger text-small">{$item->deletedmessage}</span>
{else}
</span>
{if $item->ratingdata}
<div class="star-comment-rating">
<span class="star-comment-rating ptm plm">
{for i $item->ratingdata->min_rating $item->ratingdata->max_rating}
{if !$item->ratingdata->export}
<input name="star{$item->id}" type="radio" class="star" {if $i === $item->ratingdata->value} checked="checked" {/if} disabled="disabled" />
<input name="star{$item->id}" type="radio" class="star" {if $i === $item->ratingdata->value} checked="checked" {/if} disabled="disabled" />
{else}
<div class="star-rating star star-rating-applied star-rating-readonly{if $i <= $item->ratingdata->value} star-rating-on{/if}"><a>&nbsp;</a></div>
<div class="star-rating star star-rating-applied star-rating-readonly{if $i <= $item->ratingdata->value} star-rating-on{/if}"><a>&nbsp;</a></div>
{/if}
{/for}
</div>
</span>
{/if}
</h5>
<span class="pull-right">
{if $item->deleteform}
{$item->deleteform|safe}
{/if}
{if !$onview}
{if $item->canedit}
<a href="{$WWWROOT}artefact/comment/edit.php?id={$item->id}&amp;view={$viewid}" class="btn btn-default">
<span class="icon icon-pencil"></span>
<span class="sr-only">{str tag=edit}</span>
</a>
{/if}
{/if}
<div class="detail ptm">
</span>
</div>
<div class="comment">
{if $item->deletedmessage}
<span class="metadata">
{$item->deletedmessage}
</span>
{else}
<div class="text-small text-muted">
{$item->description|safe|clean_html}
</div>
{/if}
</div>
{if $item->makepublicform || ($item->makepublicrequested && !$item->deletedmessage)}
<div class="text-right ptm">
{if $item->makepublicform}
{$item->makepublicform|safe}
{/if}
{if $item->makepublicform || ($item->makepublicrequested && !$item->deletedmessage)}
<div class="metadata">
{if $item->pubmessage}
<em class="privatemessage"> {$item->pubmessage}
</em> -
{/if}
{if $item->makepublicform}
{$item->makepublicform|safe}
{/if}
{if $item->makepublicrequested && !$item->deletedmessage}
<span class="icon icon-lock text-default prs"></span>
<span class="metadata">{str tag=youhaverequestedpublic section=artefact.comment}</span>
{/if}
</div>
{if $item->makepublicrequested && !$item->deletedmessage}
<span class="icon icon-lock text-default prs"></span>
<span>{str tag=youhaverequestedpublic section=artefact.comment}</span>
{/if}
</div>
{/if}
{if !$item->deletedmessage && $item->attachments}
<a class="collapsible collapsed panel-footer" aria-expanded="false" href="#attachments_{$item->id}" data-toggle="collapse">
<p class="text-left">
<span class="icon icon-lg prm icon-paperclip"></span>
<div class="has-attachment panel panel-default collapsible">
<h4 class="panel-heading">
<a class="collapsible collapsed" aria-expanded="false" href="#attachments_{$item->id}" data-toggle="collapse">
<span class="icon prm icon-paperclip"></span>
<span class="text-small">{str tag=Attachments section=artefact.comment}</span>
<span class="icon icon-chevron-down pull-right collapse-indicator"></span>
{if $item->attachmessage}
<em class="attachmessage metadata"> - {$item->attachmessage}</em>
{/if}
</p>
</a>
</a>
</h4>
<div id="attachments_{$item->id}" class="collapse" aria-expanded="false">
<ul class="list-unstyled list-group mb0">
<ul class=" list-group list-group-unbordered mb0">
{strip}
{foreach $item->attachments item=a name=attachments}
<li class="list-group-item-text list-group-item-link">
<a href="{$WWWROOT}artefact/file/download.php?file={$a->attachid}&comment={$item->id}&view={$viewid}">{$a->attachtitle} <span class="attachsize metadata">[{$a->attachsize}]</span></a>
<li class="list-group-item">
<a href="{$WWWROOT}artefact/file/download.php?file={$a->attachid}&comment={$item->id}&view={$viewid}" class="outer-link icon-on-hover">
<span class="sr-only">{$a->attachtitle}</span>
</a>
<span class="title plm">
{$a->attachtitle}
<span class="attachsize metadata pls">
- [{$a->attachsize}]
</span>
</span>
<span class="icon icon-download icon-lg pull-right pts text-watermark icon-action"></span>
</li>
{/foreach}
{/strip}
</ul>
</div>
</div>
{/if}
</div>
{/foreach}
</div>
<div class="list-group list-group-lite">
{foreach from=$plans.data item=plan}
<div class="list-group-item list-group-item-lite">
<div class="clearfix ptm pbm">
<div class="list-group-item">
<div class="clearfix">
<h3 class="pull-left list-group-item-heading mt0">
<a href="{$WWWROOT}artefact/plans/plan.php?id={$plan->id}">{$plan->title}
</a>
</h3>
<div class="pull-right btn-group">
<div class="pull-right btn-group btn-group-top">
<a href="{$WWWROOT}artefact/plans/edit/index.php?id={$plan->id}" title="{str(tag=editspecific arg1=$plan->title)|escape:html|safe}" class="btn btn-default btn-sm">
<span class="icon icon-pencil"></span>
{str tag=edit}
......@@ -34,3 +35,4 @@
{/if}
</div>
{/foreach}
</div>
......@@ -89,12 +89,12 @@
{/if}
{if $row->attachments}
<h5 class="plm list-group-item-heading">
<h5 class="list-group-item-heading plm ptm">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</h5>
<ul class="list-group mb0">
<ul class="list-group list-group-unbordered mb0">
{foreach from=$row->attachments item=item}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
......
......@@ -84,12 +84,12 @@
{/if}
{if $row->attachments}
<h5 class="plm list-group-item-heading">
<h5 class="list-group-item-heading plm ptm">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</h5>
<ul class="list-group mb0">
<ul class="list-group list-group-unbordered mb0">
{foreach from=$row->attachments item=item}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
......
......@@ -84,12 +84,12 @@
{/if}
{if $row->attachments}
<div class="plm list-group-item-heading">
<div class="list-group-item-heading plm ptm">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</div>
<ul class="list-group mb0">
<ul class="list-group list-group-unbordered mb0">
{foreach from=$row->attachments item=item}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
......
......@@ -83,12 +83,12 @@
{/if}
{if $row->attachments}
<div class="plm list-group-item-heading">
<div class="list-group-item-heading plm ptm">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</div>
<ul class="list-group mb0">
<ul class="list-group list-group-unbordered mb0">
{foreach from=$row->attachments item=item}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
......
......@@ -87,12 +87,12 @@
{/if}
{if $row->attachments}
<h5 class="plm list-group-item-heading">
<h5 class="list-group-item-heading plm ptm">
<span class="icon icon-paperclip prs"></span>
<span>{str tag='attachedfiles' section='artefact.blog'}</span>
({$row->clipcount})
</h5>
<ul class="list-group mb0">
<ul class="list-group list-group-unbordered mb0">
{foreach from=$row->attachments item=item}
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
......
......@@ -44,13 +44,3 @@
width: 500px;
}
}
// Resume content on page view
.resume-content {
background-color: lighten($panel-default-heading-bg, 1%);
padding: 10px;
.list-group-item {
background-color: transparent !important;
}
}
......@@ -33,9 +33,13 @@
li {
border:0;
padding: 5px 7px;
}
}
&.list-group-lite .list-group-item {
@include border-radius(0);
border-left: 0;
border-right: 0;
}
}
.list-group-item-heading {
......@@ -109,11 +113,6 @@ h4.list-group-item-heading {
&.published {
background: #fefefe;
}
&.list-group-item-lite {
@include border-radius(0);
border-left: 0;
border-right: 0;
}
@media (max-width: $screen-sm-min) {
.btn-title {
@include sr-only;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -65,7 +65,7 @@
</span>
</a>
<a href="{$WWWROOT}skin/delete.php?id={$skin.id}{if $skin.type == 'site'}&site=1{/if}" title="{str tag='deletethisskin' section='skin'}" class="btn btn-default btn-xs icon-lg">
<a href="{$WWWROOT}skin/delete.php?id={$skin.id}{if $skin.type == 'site'}&site=1{/if}" title="{str tag='deletethisskin' section='skin'}" class="btn btn-default btn-xs">
<span class="icon icon-trash text-danger icon-lg"></span>
<span class="sr-only">
{str tag=deletespecific arg1=$skin.title}
......
<!-- <div class="pull-right">
{contextualhelp plugintype='core' pluginname='view' section='viewmenu'}
</div>
-->
{if $feedback->position eq 'base' && $enablecomments}
<ul class="nav nav-tabs" role="tablist">
<li id="add_feedback_link" class="feedback active" role="presentation">
......
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