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

Style journal page (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework

Change-Id: Iff9d3aae7465aa8482b0881973badb1e36dd2b2e
parent 06d3eb82
...@@ -435,7 +435,6 @@ class ArtefactTypeBlog extends ArtefactType { ...@@ -435,7 +435,6 @@ class ArtefactTypeBlog extends ArtefactType {
$confirm = get_string('deletebloghasview?', 'artefact.blog', $viewscnt); $confirm = get_string('deletebloghasview?', 'artefact.blog', $viewscnt);
} }
} }
return pieform(array( return pieform(array(
'name' => 'delete_' . $id, 'name' => 'delete_' . $id,
'successcallback' => 'delete_blog_submit', 'successcallback' => 'delete_blog_submit',
...@@ -446,8 +445,8 @@ class ArtefactTypeBlog extends ArtefactType { ...@@ -446,8 +445,8 @@ class ArtefactTypeBlog extends ArtefactType {
'value' => $id, 'value' => $id,
), ),
'submit' => array( 'submit' => array(
'type' => 'image', 'type' => 'submit',
'src' => $THEME->get_image_url('btn_deleteremove'), 'class' => 'input-as-icon icon-trash',
'alt' => get_string('deletespecific', 'mahara', $title), 'alt' => get_string('deletespecific', 'mahara', $title),
'elementtitle' => get_string('delete'), 'elementtitle' => get_string('delete'),
'confirm' => $confirm, 'confirm' => $confirm,
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
{elseif $badtag}{str tag='notags' section='blocktype.blog/taggedposts' arg1=$badtag} {elseif $badtag}{str tag='notags' section='blocktype.blog/taggedposts' arg1=$badtag}
{elseif $full} {elseif $full}
<div id="blogdescription"> <div id="blogdescription">
<div id="postlist_{$blockid}" class="postlist fullwidth"> <div id="postlist_{$blockid}" class="postlist">
{foreach from=$results item=post} {foreach from=$results item=post}
<div class="post"> <div class="post">
<h3 class="title"><a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">{$post->title}</a></h3> <h3 class="title"><a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">{$post->title}</a></h3>
<div class="postdetails">{$post->postedbyon}</div> <div class="postdetails">{$post->postedbyon}</div>
<div class="detail">{$post->description|clean_html|safe}</div> <div class="detail">{$post->description|clean_html|safe}</div>
<div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->taglist}</div> <div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$post->owner tags=$post->taglist}</div>
{if $post->commentcount != null} {if $post->commentcount != null}
<div class="comments"> <div class="comments">
{if $post->commentcount > 0} {if $post->commentcount > 0}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{/if} {/if}
<div id="blogdescription">{$description|clean_html|safe} <div id="blogdescription">{$description|clean_html|safe}
{if $tags}<div class="tags">{str tag=tags}: {list_tags owner=$owner tags=$tags}</div>{/if} {if $tags}<div class="tags"><strong>{str tag=tags}:</strong> {list_tags owner=$owner tags=$tags}</div>{/if}
</div> </div>
<div id="postlist{if $blockid}_{$blockid}{/if}" class="postlist fullwidth"> <div id="postlist{if $blockid}_{$blockid}{/if}" class="postlist fullwidth">
{$posts.tablerows|safe} {$posts.tablerows|safe}
......
{foreach from=$blogs->data item=blog} {foreach from=$blogs->data item=blog}
<div class="{cycle name=rows values='r0,r1'} listrow"> <div class="panel panel-default blog panel-half">
<h3 class="title"><a href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">{$blog->title}</a></h3> <h3 class="panel-heading has-link">
<div class="fr nowrap"> <a class="title-link" href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">
<span class="entries"><a href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">{str tag=nposts section=artefact.blog arg1=$blog->postcount}</a></span>
<span class="newentry"> {$blog->title}
<a href="{$WWWROOT}artefact/blog/post.php?blog={$blog->id}" class="btn">{str tag=addpost section=artefact.blog}</a>
</span> {if $blog->postcount == 0}
<span class="control-buttons"> <span class="metadata mls">
{str tag=nopostsyet section=artefact.blog}
</span>
{else}
<span class="metadata mls">
{str tag=nposts section=artefact.blog arg1=$blog->postcount}
</span>
{/if}
<span class="fa fa-arrow-right mrs pull-right link-indicator"></span>
</a>
</h3>
<div id="blogdesc" class="panel-body">
<a class="unstyled" href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">
{$blog->description|clean_html|safe}
</a>
</div>
<div class="panel-footer has-form">
<a href="{$WWWROOT}artefact/blog/post.php?blog={$blog->id}" class="btn btn-primary btn-xs">
<span class="fa fa-plus mrs"></span>
{str tag=addpost section=artefact.blog}
</a>
<div class="pull-right">
{if $blog->locked} {if $blog->locked}
<span class="s dull">{str tag=submittedforassessment section=view}</span> {str tag=submittedforassessment section=view}
{else} {else}
<a href="{$WWWROOT}artefact/blog/settings/index.php?id={$blog->id}" title="{str tag=settings}"><img src="{theme_url filename='images/btn_configure.png'}" alt="{str(tag=settingsspecific arg1=$blog->title)|escape:html|safe}"></a> <a href="{$WWWROOT}artefact/blog/settings/index.php?id={$blog->id}" title="{str tag=settings}" class="btn btn-default btn-xs">
<span class="fa fa-pencil"></span>
<span class="sr-only">
{str(tag=settingsspecific arg1=$blog->title)|escape:html|safe}
</span>
</a>
<span class="control">
{$blog->deleteform|safe} {$blog->deleteform|safe}
</span>
{/if} {/if}
</span> </div>
</div> </div>
<div id="blogdesc">{$blog->description|clean_html|safe}</div>
<div class="cb"></div>
</div> </div>
{/foreach} {/foreach}
...@@ -6,9 +6,11 @@ ...@@ -6,9 +6,11 @@
{if !$blogs->data} {if !$blogs->data}
<div>{str tag=youhavenoblogs section=artefact.blog}</div> <div>{str tag=youhavenoblogs section=artefact.blog}</div>
{else} {else}
<div id="bloglist" class="fullwidth listing">
<div class="panel-items js-masonry" data-masonry-options='{ "itemSelector": ".panel" }'>
{$blogs->tablerows|safe} {$blogs->tablerows|safe}
</div> </div>
{$blogs->pagination|safe} {$blogs->pagination|safe}
{/if} {/if}
</div> </div>
......
...@@ -30,25 +30,34 @@ ...@@ -30,25 +30,34 @@
{/if} {/if}
</span> </span>
</div> </div>
<div id="postdetails_{$post->id}" class="postdetails postdate"> <div id="postdetails_{$post->id}" class="postdetails">
{str tag=postedon section=artefact.blog} {$post->ctime} <span class="postdate">
<span class="fa fa-calendar mrs"></span>
<strong>{str tag=postedon section=artefact.blog}: </strong> {$post->ctime}
</span>
{if $post->tags}
<span id="posttags_{$post->id}" class="tags mrs">
<span class="fa fa-tags"></span>
<strong>{str tag=tags}:</strong>
{list_tags owner=$post->author tags=$post->tags}
</span>
{/if}
</div> </div>
</div> </div>
<div id="postdescription_{$post->id}" class="postdescription ptl"> <div id="postdescription_{$post->id}" class="postdescription mtl ptl pbl">
{$post->description|clean_html|safe} {$post->description|clean_html|safe}
</div> </div>
{if $post->tags}<div id="posttags_{$post->id}" class="tags">{str tag=tags}: {list_tags owner=$post->author tags=$post->tags}</div>{/if}
{if $post->files} {if $post->files}
<div id="postfiles_{$post->id}"> <div id="postfiles_{$post->id}">
<div class="attachments"> <div class="attachments">
<div class="attachment-heading"> <div class="attachment-heading collapsible">
<span class="badge"> <a class="attach-files collapsed" data-toggle="collapse" href="#attach_{$post->id}" aria-expanded="false">
{$post->files|count} <span class="badge">
</span> {$post->files|count}
<a class="attach-files" data-toggle="collapse" href="#attach_{$post->id}" aria-expanded="false"> </span>
{str tag=attachedfiles section=artefact.blog} {str tag=attachedfiles section=artefact.blog}
<span class="fa fa-chevron-up"></span> <span class="fa fa-chevron-up link-indicator"></span>
</a> </a>
</div> </div>
<div class="collapse files" id="attach_{$post->id}"> <div class="collapse files" id="attach_{$post->id}">
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
</div> </div>
{if $blog->get('tags')} {if $blog->get('tags')}
<div class="tags"> <div class="tags">
{str tag=tags}: {list_tags owner=$blog->get('owner') tags=$blog->get('tags')} <strong>{str tag=tags}:</strong> {list_tags owner=$blog->get('owner') tags=$blog->get('tags')}
</div> </div>
{/if} {/if}
{if $posts} {if $posts}
<div id="postlist" class="fullwidth listing"> <div id="postlist" class="listing ptl">
{$posts.tablerows|safe} {$posts.tablerows|safe}
</div> </div>
<div id="blogpost_page_container" class="hidden">{$posts.pagination|safe}</div> <div id="blogpost_page_container" class="hidden">{$posts.pagination|safe}</div>
......
...@@ -11,6 +11,17 @@ ...@@ -11,6 +11,17 @@
} }
} }
.collapsible{
legend h4 {
a {
@include text-shadow(1px 0 0 #fff);
background-color: darken(#f5f5f5, 1%);
border: 1px solid $panel-default-border;
border-bottom: 0;
padding: 10px 15px;
}
}
}
.pieform-fieldset, .pieform-fieldset,
.panel-collapse { .panel-collapse {
@include box-shadow(none); @include box-shadow(none);
...@@ -56,36 +67,11 @@ ...@@ -56,36 +67,11 @@
margin: 0; margin: 0;
font-size: 16px; font-size: 16px;
padding: 0; padding: 0;
.pieform > .collapsible-group:first-child & { .pieform > .collapsible-group:first-child & {
@include border-top-radius(3px); @include border-top-radius(3px);
} }
a {
background-color: darken(#f5f5f5, 1%);
display: block;
color: #333;
padding: 10px 15px;
&.collapsed {
background-color: #f9f9f9;
color: #333;
}
&:hover, &:focus {
background-color: darken(#f5f5f5, 1%);
text-decoration: none;
}
.pieform > .collapsible-group:first-child &,
.first & {
@include border-top-radius(3px);
}
}
}
legend h4 {
a {
@include text-shadow(1px 0 0 #fff);
border: 1px solid $panel-default-border;
border-bottom: 0;
}
} }
.fieldset-body { .fieldset-body {
...@@ -123,6 +109,9 @@ ...@@ -123,6 +109,9 @@
.collapsible-group { .collapsible-group {
margin-bottom: 0; margin-bottom: 0;
&.form-group {
display:block;
}
.panel { .panel {
@include border-radius(0); @include border-radius(0);
} }
......
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