Commit 0cc32f9b authored by Naomi Guyer's avatar Naomi Guyer Committed by Aaron Wells

Bootstrap set up

Bug 1465107: Use Bootstrap CSS Framework
Initial bootstrap dependencies
Initial grid
Add brand colours
Bootstrap variables

Change-Id: Ic08f8ab8ad0435c2e92794c4c605cfe8095823dc
parent 73980105
/config.php
!lib/tests
*.scssc
\ No newline at end of file
{if ($editing)}
<div class="shortcut nojs-hidden-block">
<div{if (count($blogs) == 1)} class="hidden"{/if}>
<label class="text" for="blogselect_{$blockid}">{str tag='shortcutaddpost' section='artefact.blog'}</label>
<select id="blogselect_{$blockid}" class="select">
{foreach from=$blogs item=blog}
<option value="{$blog->id}"> {$blog->title} </option>
{/foreach}
</select>
<a class="btn btnshortcut">{str tag='shortcutgo' section='artefact.blog'}</a>
</div>
<a class="btn btnshortcut{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
</div>
{/if}
<ul class="recentblogpost">
{foreach from=$mostrecent item=post}
<li>
<strong><a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&amp;view={$view}">{$post->title}</a></strong>
{str tag='postedin' section='blocktype.blog/recentposts'}
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->parent}&amp;view={$view}">{$post->parenttitle}</a>
{str tag='postedon' section='blocktype.blog/recentposts'}
<span>{$post->displaydate}</span>
</li>
{/foreach}
</ul>
{if ($editing)}
<div class="shortcut nojs-hidden-block">
<div{if (count($blogs) == 1)} class="hidden"{/if}>
<label class="text">{str tag='shortcutaddpost' section='artefact.blog'}</label>
<select id="blogselect_{$blockid}" class="select">{foreach from=$blogs item=blog}<option value="{$blog->id}"> {$blog->title} </option>{/foreach}</select>
<input class="select" type="hidden" value="{$tagselect}">
<a class="btn btnshortcut">{str tag='shortcutgo' section='artefact.blog'}</a>
</div>
<a class="btn btnshortcut {if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
</div>
{/if}
<p>{str tag='blockheading' section='blocktype.blog/taggedposts'}
{if $viewowner}{$tag} {str tag='by' section='artefact.blog'} <a href="{profile_url($viewowner)}">{$viewowner|display_name}</a>
{else}<a href="{$WWWROOT}tags.php?tag={$tag}&sort=name&type=text">{$tag}</a>{/if}</p>
{if $configerror}{str tag='configerror' section='blocktype.blog/taggedposts'}
{elseif $badtag}{str tag='notags' section='blocktype.blog/taggedposts' arg1=$badtag}
{elseif $full}
<div id="blogdescription">
<div id="postlist_{$blockid}" class="postlist fullwidth">
{foreach from=$results item=post}
<div class="post">
<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="detail">{$post->description|clean_html|safe}</div>
<div class="tags">{str tag=tags}: {list_tags owner=$post->owner tags=$post->taglist}</div>
{if $post->commentcount != null}
<div class="comments">
{if $post->commentcount > 0}
<a id="block_0{$post->id}{$blockid}" class="commentlink" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">{str tag=Comments section=artefact.comment} ({$post->commentcount})</a>
{else}
{if $post->allowcomments}
<span class="nocomments">{str tag=Comments section=artefact.comment} ({$post->commentcount})</span>
{/if}
{/if}
{if $post->allowcomments}
<a class="addcomment bar-before" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">{str tag=addcomment section=artefact.comment}</a>
{/if}
</div>
<div class="feedbacktablewrapper">
<div id="feedbacktable_0{$post->id}{$blockid}" class="feedbacktable">
{$post->comments->tablerows|safe}
</div>
</div>
{/if}
</div>
{/foreach}
</div>
</div>
{else}<ul class="taggedposts">{foreach from=$results item=post}
<li>
<strong><a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">{$post->title}</a></strong>
{str tag='postedin' section='blocktype.blog/taggedposts'}
{if $viewowner}{$post->parenttitle}
{else}<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->parent}&view={$view}">{$post->parenttitle}</a>{/if}
<span class="postdetails">{str tag='postedon' section='blocktype.blog/taggedposts'} {$post->displaydate}</span>
</li>
{/foreach}</ul>
{/if}
{include file="export:html:header.tpl"}
{$rendered_blog|safe}
{include file="export:html:footer.tpl"}
<p>{$stryouhaveblogs}</p>
{if $blogs}
<ul>
{foreach from=$blogs item=blog}
<li><a href="{$blog.link}">{$blog.title}</a></li>
{/foreach}
</ul>
{/if}
/**
* CSS rules for the blog artefact plugin
*
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
* This file is distributed under the same terms as Mahara itself
*/
/* Blog list */
#bloglist #blogdesc p {
margin: 5px 0;
}
#bloglist .buttonscell form,
#postlist form {
display: inline;
vertical-align: top;
margin: 0 0 0 5px;
}
#bloglist .buttonscell form div,
#postlist form div {
display: inline;
vertical-align: top;
}
/* Post list */
#blogdescription {
margin: 0 0 10px 0;
}
#postlist {
margin: 10px 0 0 0;
}
#postlist .poststatus {
vertical-align: top;
}
#postlist input.publish {
vertical-align: top;
}
#postlist .published,
#postlist .draft {
padding: 10px;
margin: 20px 0;
}
.attachments input.unselect {
font-size: .9167em;
}
/* Insert Image Dialog */
#img_src[disabled=""] {
background-color: #F0F0EE;
}
\ No newline at end of file
<tr>
<td class="iconcell" rowspan="2">
{$formcontrols|safe}
</td>
<th><label for="{$elementname}_{$artefact->id}">{if $artefact->blog}{$artefact->blog}: {/if}{$artefact->title}{if $artefact->draft} [{str tag=draft section=artefact.blog}]{/if}</label></th>
</tr>
<tr>
<td>{if $artefact->description}{$artefact->description|clean_html|safe}{/if}</td>
</tr>
\ No newline at end of file
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{$feed.title}</title>
<id>{$feed.id}</id>
<link href="{$feed.link}" />
<link rel="self" type="application/atom+xml" href="{$feed.selflink}" />
<subtitle type="html"><![CDATA[ {$feed.description|clean_html|safe} ]]></subtitle>
<logo>{$feed.logo}</logo>
<icon>{$feed.icon}</icon>
<generator uri="{$feed.generator.uri}" version="{$feed.generator.version}">
{$feed.generator.text}
</generator>
<author>
<name>{$feed.author.name}</name>
{if $feed.author.uri}
<uri>{$feed.author.uri}</uri>
{/if}
</author>
<updated>{$feed.updated}</updated>
<rights type="html"><![CDATA[ {$feed.rights} ]]></rights>
{foreach from=$posts item=post}
<entry>
<title>{$post.title}</title>
<id>{$post.id}</id>
<link href="{$post.link}" />
<content type="html"><![CDATA[ {$post.description|clean_html|safe} ]]></content>
<author>
<name>{$feed.author.name}</name>
</author>
<updated>{$post.mtime}</updated>
<rights type="html"><![CDATA[ {$feed.rights} ]]></rights>
{foreach from=$post.attachments item=attachlink}
<link rel="enclosure" title="{$attachlink.title}" href="{$attachlink.link}" />
{/foreach}
</entry>
{/foreach}
</feed>
{if ($editing)}
<div class="shortcut">
<span> <a class="btn" href="{$WWWROOT}artefact/blog/post.php?blog={$blogid}" target="_blank">{str tag='shortcutnewentry' section='artefact.blog'}</a> </span>
</div>
{/if}
{if !$options.hidetitle}
<h2>{$artefacttitle|safe}</h2>
{/if}
<div id="blogdescription">{$description|clean_html|safe}
{if $tags}<div class="tags">{str tag=tags}: {list_tags owner=$owner tags=$tags}</div>{/if}
</div>
<div id="postlist{if $blockid}_{$blockid}{/if}" class="postlist fullwidth">
{$posts.tablerows|safe}
</div>
{if $posts.pagination}
<div id="blogpost_page_container{if $blockid}_{$blockid}{/if}" class="hidden center">{$posts.pagination|safe}</div>
{/if}
{if $license}
<div class="bloglicense">
{$license|safe}
</div>
{/if}
{if $posts.pagination_js}
<script>
addLoadEvent(function() {literal}{{/literal}
{$posts.pagination_js|safe}
removeElementClass('blogpost_page_container{if $blockid}_{$blockid}{/if}', 'hidden');
{literal}}{/literal});
</script>
{/if}
{foreach from=$blogs->data item=blog}
<div class="{cycle name=rows values='r0,r1'} listrow">
<h3 class="title"><a href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">{$blog->title}</a></h3>
<div class="fr nowrap">
<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"><a href="{$WWWROOT}artefact/blog/post.php?blog={$blog->id}" class="btn">{str tag=addpost section=artefact.blog}</a></span>
<span class="btns2">
{if $blog->locked}
<span class="s dull">{str tag=submittedforassessment section=view}</span>
{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>
{$blog->deleteform|safe}
{/if}
</span>
</div>
<div id="blogdesc">{$blog->description|clean_html|safe}</div>
<div class="cb"></div>
</div>
{/foreach}
<h3 class="title">{$artefacttitle|safe}</h3>
<div class="detail">{$description|str_shorten_html:80:true|strip_tags|safe}</div>
{include file="header.tpl"}
{$form|safe}
{include file="footer.tpl"}
{if count($entryblogs)}
<div class="section fullwidth">
<h2>{str tag=blog section=artefact.blog}</h2>
</div>
{foreach from=$entryblogs item=blog}
<div class="{cycle name=rows values='r0,r1'} listrow">
<div id="entryblog" class="indent1">
<div class="importcolumn importcolumn1">
<h3 class="title">
{if $blog.description}<a class="blogtitle" href="" id="{$blog.id}">{/if}
{$blog.title|str_shorten_text:80:true}
{if $blog.description}</a>{/if}
</h3>
<div id="{$blog.id}_desc" class="detail hidden">{$blog.description|clean_html|safe}</div>
{if $blog.tags}
<div class="tags">
<strong>{str tag=tags}:</strong> {list_tags owner=0 tags=$blog.tags}
</div>
{/if}
<div class="posts">
<strong>{str tag=blogpost section=artefact.blog}:</strong> <a class="showposts" href="" id="{$blog.id}">{str tag=nposts section=artefact.blog arg1=count($blog.entryposts)}</a>
</div>
</div>
<div class="importcolumn importcolumn2">
{if $blog.duplicateditem}
<div class="duplicatedblog">
<strong>{str tag=duplicatedblog section=artefact.blog}:</strong> <a class="showduplicatedblog" href="" id="{$blog.duplicateditem.id}">{$blog.duplicateditem.title|str_shorten_text:80:true}</a>
<div id="{$blog.duplicateditem.id}_duplicatedblog" class="detail hidden">{$blog.duplicateditem.html|clean_html|safe}</div>
</div>
{/if}
{if $blog.existingitems}
<div class="existingblogs">
<strong>{str tag=existingblogs section=artefact.blog}:</strong>
{foreach from=$blog.existingitems item=existingitem}
<a class="showexistingblog" href="" id="{$existingitem.id}">{$existingitem.title|str_shorten_text:80:true}</a><br>
<div id="{$existingitem.id}_existingblog" class="detail hidden">{$existingitem.html|clean_html|safe}</div>
{/foreach}
</div>
{/if}
</div>
<div class="importcolumn importcolumn3">
{foreach from=$displaydecisions key=opt item=displayopt}
{if !$blog.disabled[$opt]}
<input id="decision_{$blog.id}_{$opt}" class="blogdecision" id="{$blog.id}" type="radio" name="decision_{$blog.id}" value="{$opt}"{if $blog.decision == $opt} checked="checked"{/if}>
<label for="decision_{$blog.id}_{$opt}">{$displayopt}<span class="accessible-hidden">({$blog.title})</span></label><br>
{/if}
{/foreach}
</div>
<div class="cb"></div>
</div>
<div id="{$blog.id}_posts" class="indent2 hidden">
{foreach from=$blog.entryposts item=post}
<div id="posttitle_{$post.id}" class="{cycle name=rows values='r0,r1'} listrow {if $post.published}published{else}draft{/if}">
<div class="importcolumn importcolumn1">
<h4 class="title">
{if $post.description}<a class="posttitle" href="" id="{$post.id}">{/if}
{$post.title|str_shorten_text:80:true}
{if $post.description}</a>{/if}
</h4>
<div id="{$post.id}_desc" class="detail hidden">
{$post.description|clean_html|safe}
</div>
<span id="poststatus{$post.id}" class="poststatus">
{if $post.published}
{str tag=published section=artefact.blog}
{else}
{str tag=draft section=artefact.blog}
{/if}
</span>
{if $post.files}
<div id="postfiles">
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<td>
<a class="showpostfiles toggle expandable" id="{$blog.id}_{$post.id}" href="">{str tag=attachedfiles section=artefact.blog}</a>
<span class="fr">
<img class="fl" src="{theme_url filename='images/attachment.png'}" alt="{str tag=Attachments section=artefact.resume}">
{$post.files|count}
</span>
</td>
</tr>
</thead>
<tbody id="{$blog.id}_{$post.id}_postfiles" class="expandable-body hidden">
{foreach from=$post.files item=file}
<tr class="{cycle values='r1,r0'}">
<td><h3 class="title">{$file.title}</h3>
<div class="detail">{$file.description}</div></td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
<div id="postdetails_{$post.id}" class="postdetails">
{str tag=postedon section=artefact.blog} {$post.ctime}
</div>
</div>
<div class="importcolumn importcolumn2">
{if $post.duplicateditem}
<div class="duplicatedpost">
<strong>{str tag=duplicatedpost section=artefact.blog}:</strong> <a class="showduplicatedpost" href="" id="{$post.duplicateditem.id}">{$post.duplicateditem.title|str_shorten_text:80:true}</a>
<div id="{$post.duplicateditem.id}_duplicatedpost" class="detail hidden">{$post.duplicateditem.html|clean_html|safe}</div>
</div>
{/if}
{if $post.existingitems}
<div class="existingposts">
<strong>{str tag=existingposts section=artefact.blog}:</strong>
{foreach from=$post.existingitems item=existingitem}
<a class="showexistingpost" href="" id="{$existingitem.id}">{$existingitem.title|str_shorten_text:80:true}</a><br>
<div id="{$existingitem.id}_existingpost" class="detail hidden">{$existingitem.html|clean_html|safe}</div>
{/foreach}
</div>
{/if}
</div>
<div class="importcolumn importcolumn3">
{foreach from=$displaydecisions key=opt item=displayopt}
{if !$post.disabled[$opt]}
<input id="decision_{$post.id}_{$opt}" class="postdecision" type="radio" name="decision_{$post.id}" value="{$opt}"{if $post.decision == $opt} checked="checked"{/if}>
<label for="decision_{$post.id}_{$opt}">{$displayopt}<span class="accessible-hidden">({$post.title})</span></label><br>
{/if}
{/foreach}
</div>
<div class="cb"></div>
</div>
{/foreach}
</div>
<div class="cb"></div>
</div>
{/foreach}
<script type="text/javascript">
jQuery(function() {
jQuery("a.blogtitle").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_desc").toggleClass("hidden");
});
jQuery("a.posttitle").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_desc").toggleClass("hidden");
});
jQuery("a.showduplicatedblog").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_duplicatedblog").toggleClass("hidden");
});
jQuery("a.showexistingblog").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_existingblog").toggleClass("hidden");
});
jQuery("a.showduplicatedpost").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_duplicatedpost").toggleClass("hidden");
});
jQuery("a.showexistingpost").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_existingpost").toggleClass("hidden");
});
jQuery("a.showposts").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_posts").toggleClass("hidden");
});
jQuery("a.showpostfiles").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_postfiles").toggleClass("hidden");
});
jQuery("input.blogdecision").change(function(e) {
e.preventDefault();
if (this.value == '1') {
// The import decision for the blog is IGNORE
// Set decision for its blogposts to be IGNORE as well
jQuery("#" + this.id + "_posts input.postdecision[value=1]").prop('checked', true);
}
});
});
</script>
{/if}
{include file="header.tpl"}
<div class="rbuttons">
<a class="btn" href="{$WWWROOT}artefact/blog/new/index.php">{str section="artefact.blog" tag="addblog"}</a>
</div>
<div id="myblogs" class="rel">
{if !$blogs->data}
<div>{str tag=youhavenoblogs section=artefact.blog}</div>
{else}
<div id="bloglist" class="fullwidth listing">
{$blogs->tablerows|safe}
</div>
{$blogs->pagination|safe}
{/if}
</div>
{include file="footer.tpl"}
{foreach from=$posts item=post}
<div id="posttitle_{$post->id}" class="{if $post->published}published{else}draft{/if}">
<div class="fr">
<span id="poststatus{$post->id}" class="poststatus">
{if $post->published}
{str tag=published section=artefact.blog}
{else}
{str tag=draft section=artefact.blog}
{/if}
</span>
<span id="changepoststatus{$post->id}" class="changepoststatus">
{if !$post->locked}
{$post->changepoststatus|safe}
{/if}
</span>
<span class="controls">
{if $post->locked}
{str tag=submittedforassessment section=view}
{else}
<form name="edit_{$post->id}" action="{$WWWROOT}artefact/blog/post.php">
<input type="hidden" name="id" value="{$post->id}">
<input type="image" src="{theme_url filename="images/btn_edit.png"}" alt="{str(tag=editspecific arg1=$post->title)|escape:html|safe}" title="{str tag=edit}">
</form>
{$post->delete|safe}
{/if}
</span>
</div>
<h2>{$post->title}</h2>
<div id="postdetails_{$post->id}" class="postdetails postdate">
{str tag=postedon section=artefact.blog} {$post->ctime}
</div>
<div id="postdescription_{$post->id}" class="postdescription">
{$post->description|clean_html|safe}
</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}
<div id="postfiles_{$post->id}">
<table class="cb attachments fullwidth">
<thead class="expandable-head">
<tr>
<td colspan="2">
<a class="toggle" href="#">{str tag=attachedfiles section=artefact.blog}</a>
<span class="fr">
<img class="fl" src="{theme_url filename='images/attachment.png'}" alt="{str tag=Attachments section=artefact.resume}">
{$post->files|count}
</span>
</td>