Commit 0216e35f authored by Evonne Cheung's avatar Evonne Cheung Committed by Robert Lyon

UI changes for Mahara 1.8 Bug #1199563

Here are all the UI changes that were made by Evonne

Change-Id: I08d98d759a701deaf0a332af9e9392b7270704a5
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 6925b0fb
......@@ -39,7 +39,7 @@ if ($readone) {
$unread = $USER->add_unread(-1);
$data = array(
'newunreadcount' => $unread,
'newimage' => $THEME->get_url($unread ? 'images/newemail.gif' : 'images/email.gif'),
'newimage' => $THEME->get_url($unread ? 'images/newmail.png' : 'images/message.png'),
);
json_reply(false, array('data' => $data));
}
......@@ -114,7 +114,7 @@ $newhtml = activitylist_html($type, $limit, $offset);
if (isset($newunread)) {
$newhtml['newunreadcount'] = $newunread;
$newhtml['newimage'] = $THEME->get_url($newunread ? 'images/newemail.gif' : 'images/email.gif');
$newhtml['newimage'] = $THEME->get_url($newunread ? 'images/newmail.png' : 'images/message.png');
}
json_reply(false, (object) array('message' => $message, 'data' => $newhtml));
......@@ -76,7 +76,7 @@ require_once('activity.php');
$activitylist = activitylist_html($type);
$star = json_encode($THEME->get_url('images/star.png'));
$readicon = json_encode($THEME->get_url('images/readusermessage.gif'));
$readicon = json_encode($THEME->get_url('images/readusermessage.png'));
$strread = json_encode(get_string('read', 'activity'));
$javascript = <<<JAVASCRIPT
......
......@@ -116,7 +116,7 @@ foreach ($iframesources as $url => $name) {
),
'submit' => array(
'type' => 'image',
'src' => $THEME->get_url('images/icon_close.gif'),
'src' => $THEME->get_url('images/btn_deleteremove.png'),
'elementtitle' => get_string('delete'),
'confirm' => get_string('confirmdeletemenuitem', 'admin'),
),
......
......@@ -155,8 +155,8 @@ foreach (array_keys($plugins) as $plugin) {
global $THEME;
$loadingicon = $THEME->get_url('images/loading.gif');
$successicon = $THEME->get_url('images/success.gif');
$failureicon = $THEME->get_url('images/failure.gif');
$successicon = $THEME->get_url('images/success.png');
$failureicon = $THEME->get_url('images/failure.png');
$loadingstring = json_encode(get_string('upgradeloading', 'admin'));
$successstring = json_encode(get_string('upgradesuccesstoversion', 'admin'));
......
......@@ -87,9 +87,9 @@ function displaymenuitems(itemlist) {
// Creates one table row
function formatrow (item) {
// item has id, type, name, link, linkedto
var edit = INPUT({'type':'image','src':config.theme['images/edit.gif'],'title':{$getstring['edit']}});
var edit = INPUT({'type':'image','src':config.theme['images/btn_edit.png'],'title':{$getstring['edit']}});
connect(edit, 'onclick', function (e) { e.stop(); edititem(item); });
var del = INPUT({'type':'image','src':config.theme['images/icon_close.gif'],'title':{$getstring['delete']}});
var del = INPUT({'type':'image','src':config.theme['images/btn_deleteremove.png'],'title':{$getstring['delete']}});
connect(del, 'onclick', function (e) { e.stop(); delitem(item.id); });
var cells = map(
partial(TD,null),
......
......@@ -101,8 +101,8 @@ if (empty($upgrades['core']->install)) {
}
$loadingicon = $THEME->get_url('images/loading.gif');
$successicon = $THEME->get_url('images/success.gif');
$failureicon = $THEME->get_url('images/failure.gif');
$successicon = $THEME->get_url('images/success.png');
$failureicon = $THEME->get_url('images/failure.png');
// Remove all files in the smarty and dwoo caches
// TODO post 1.2 remove the smarty part
......
......@@ -76,7 +76,7 @@ $calendar = array(
'tabindex' => false,
'type' => 'calendar',
'title' => get_string('date'),
'imagefile' => $THEME->get_url('images/calendar.gif'),
'imagefile' => $THEME->get_url('images/btn_calendar.png'),
'defaultvalue' => strtotime($search->loggedindate),
'caloptions' => array(
'showsTime' => true,
......
{if ($editing)}
<div class="shortcut right nojs-hidden-block">
<div class="shortcut nojs-hidden-block">
<div{if (count($blogs) == 1)} class="hidden"{/if}>
<span class="text">{str tag='shortcutaddpost' section='artefact.blog'}</span>
<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="shortcut btn">{str tag='shortcutgo' section='artefact.blog'}</a>
<a class="btn">{str tag='shortcutgo' section='artefact.blog'}</a>
</div>
<a class="shortcut btn{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
<a class="btn{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
</div>
{/if}
<ul class="recentblogpost">
......@@ -19,7 +19,7 @@
{str tag='postedin' section='blocktype.blog/recentposts'}
<a href="{$WWWROOT}view/artefact.php?artefact={$post->parent}&amp;view={$view}">{$post->parenttitle}</a>
{str tag='postedon' section='blocktype.blog/recentposts'}
<span class="description">{$post->displaydate}</span>
<span>{$post->displaydate}</span>
</li>
{/foreach}
</ul>
......@@ -4,32 +4,31 @@
<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="shortcut btn">{str tag='shortcutgo' section='artefact.blog'}</a>
<a class="btn">{str tag='shortcutgo' section='artefact.blog'}</a>
</div>
<a class="shortcut btn{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
<a class="btn{if (count($blogs) != 1)} hidden{/if}">{str tag='shortcutnewentry' section='artefact.blog'}</a>
</div>
{/if}
{str tag='blockheading' section='blocktype.blog/taggedposts'}
{if $viewowner}<strong>{$tag}</strong> by <strong><a href="{profile_url($viewowner)}">{$viewowner|display_name}</a></strong>
{else}<strong><a href="{$WWWROOT}tags.php?tag={$tag}&sort=name&type=text">{$tag}</a></strong>{/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">
<table id="postlist_{$blockid}" class="postlist"><tbody>
<div id="postlist_{$blockid}" class="postlist fullwidth">
{foreach from=$results item=post}
<tr><td>
<h3><a href="{$WWWROOT}view/artefact.php?artefact={$post->id}&view={$view}">{$post->title}</a></h3>
<div>{$post->description|clean_html|safe}
<p class="tags s"><label>{str tag=tags}:</label> {list_tags owner=$post->owner tags=$post->taglist}</p>
</div>
<div class="post">
<h3 class="title"><a href="{$WWWROOT}view/artefact.php?artefact={$post->id}&view={$view}">{$post->title}</a></h3>
<div class="detail">{$post->description|clean_html|safe}</div>
<div class="tags"><label>{str tag=tags}:</label> {list_tags owner=$post->owner tags=$post->taglist}</div>
<div class="postdetails">{$post->postedbyon}
{if $post->allowcomments} | <a href="{$WWWROOT}view/artefact.php?artefact={$post->id}&view={$view}">{str tag=Comments section=artefact.comment} ({$post->commentcount})</a>{/if}</div>
</td></tr>
</div>
{/foreach}
</tbody></table>
</div>
</div>
{else}<ul class="taggedposts">{foreach from=$results item=post}
......@@ -38,7 +37,7 @@
{str tag='postedin' section='blocktype.blog/taggedposts'}
{if $viewowner}{$post->parenttitle}
{else}<a href="{$WWWROOT}view/artefact.php?artefact={$post->parent}&view={$view}">{$post->parenttitle}</a>{/if}
{str tag='postedon' section='blocktype.blog/taggedposts'} <span class="description">{$post->displaydate}</span>
<span class="postdetails">{str tag='postedon' section='blocktype.blog/taggedposts'} {$post->displaydate}</span>
</li>
{/foreach}</ul>
{/if}
......@@ -56,6 +56,7 @@ $string['blogsettings'] = 'Journal settings';
$string['blogtitle'] = 'Title';
$string['blogtitledesc'] = 'e.g., ‘Jill’s Nursing Practicum Journal’.';
$string['border'] = 'Border';
$string['by'] = 'by';
$string['cancel'] = 'Cancel';
$string['createandpublishdesc'] = 'This will create the journal entry and make it available to others.';
$string['createasdraftdesc'] = 'This will create the journal entry, but it will not become available to others until you choose to publish it.';
......
......@@ -268,7 +268,7 @@ class ArtefactTypeBlog extends ArtefactType {
public static function get_icon($options=null) {
global $THEME;
return $THEME->get_url('images/blog.gif', false, 'artefact/blog');
return $THEME->get_url('images/journal.png', false);
}
public static function is_singular() {
......@@ -420,7 +420,7 @@ class ArtefactTypeBlog extends ArtefactType {
),
'submit' => array(
'type' => 'image',
'src' => $THEME->get_url('images/icon_close.gif'),
'src' => $THEME->get_url('images/btn_deleteremove.png'),
'elementtitle' => get_string('delete', 'artefact.blog'),
'confirm' => get_string('deleteblog?', 'artefact.blog'),
),
......@@ -670,7 +670,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
public static function get_icon($options=null) {
global $THEME;
return $THEME->get_url('images/blogpost.gif', false, 'artefact/blog');
return $THEME->get_url('images/journal_entry.png', false);
}
public static function is_singular() {
......@@ -909,7 +909,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
),
'submit' => array(
'type' => 'image',
'src' => $THEME->get_url('images/icon_close.gif'),
'src' => $THEME->get_url('images/btn_deleteremove.png'),
'elementtitle' => get_string('delete', 'artefact.blog'),
'confirm' => get_string('deleteblogpost?', 'artefact.blog'),
),
......
{if ($editing)}
<div class="right">
<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}
......@@ -8,13 +8,11 @@
{/if}
<div id="blogdescription">{$description|clean_html|safe}
{if $tags}<p class="tags s"><label>{str tag=tags}:</label> {list_tags owner=$owner tags=$tags}</p>{/if}
{if $tags}<div class="tags"><label>{str tag=tags}:</label> {list_tags owner=$owner tags=$tags}</div>{/if}
</div>
<table id="postlist{if $blockid}_{$blockid}{/if}" class="postlist">
<tbody>
<div id="postlist{if $blockid}_{$blockid}{/if}" class="postlist fullwidth">
{$posts.tablerows|safe}
</tbody>
</table>
</div>
{if $posts.pagination}
<div id="blogpost_page_container{if $blockid}_{$blockid}{/if}" class="hidden center">{$posts.pagination|safe}</div>
{/if}
......
{foreach from=$blogs->data item=blog}
<tr class="{cycle name=rows values='r0,r1'}">
<td colspan="2">
<div class="fr">
<div class="{cycle name=rows values='r0,r1'} listrow">
<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/manage.gif'}" alt="{str tag=settings}"></a>
<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=settings}"></a>
{$blog->deleteform|safe}
{/if}
</span>
</div>
<h4><a href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">{$blog->title}</a></h4>
<h3 class="title"><a href="{$WWWROOT}artefact/blog/view/index.php?id={$blog->id}">{$blog->title}</a></h3>
<div id="blogdesc">{$blog->description|clean_html|safe}</div>
</td>
</tr>
<div class="cb"></div>
</div>
{/foreach}
......@@ -6,15 +6,10 @@
{if !$blogs->data}
<div>{str tag=youhavenoblogs section=artefact.blog}</div>
{else}
<table id="bloglist" class="tablerenderer fullwidth">
<thead>
<tr><th></th><th></th></tr>
</thead>
<tbody>
<div id="bloglist" class="fullwidth listing">
{$blogs->tablerows|safe}
</tbody>
</table>
</div>
{$blogs->pagination|safe}
{/if}
</div>
</div>
{include file="footer.tpl"}
......@@ -19,29 +19,26 @@
{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/edit.gif"}" title="{str tag=edit}">
<input type="image" src="{theme_url filename="images/btn_edit.png"}" title="{str tag=edit}">
</form>
{$post->delete|safe}
{/if}
</span>
</div>
<h1 class="posttitle">{$post->title}</h1>
<h2>{$post->title}</h2>
<div id="postdescription_{$post->id}" class="postdescription">
{$post->description|clean_html|safe}
</div>
{if $post->files}
<div id="postfiles_{$post->id}">
<table class="attachments fullwidth">
<col width="5%">
<col width="40%">
<col width="55%">
<tbody>
<tr><th colspan=3>{str tag=attachedfiles section=artefact.blog}</th></tr>
{foreach from=$post->files item=file}
<tr class="{cycle values='r1,r0'}">
<td><img src="{$file->icon}" alt=""></td>
<td class="valign"><a href="{$WWWROOT}artefact/file/download.php?file={$file->attachment}">{$file->title}</a></td>
<td class="valign">{$file->description}</td>
<td class="icon-container"><img src="{$file->icon}" alt=""></td>
<td><a href="{$WWWROOT}artefact/file/download.php?file={$file->attachment}">{$file->title}</a></td>
<td>{$file->description}</td>
</tr>
{/foreach}
</tbody>
......
......@@ -2,16 +2,16 @@
* This template displays a blog post.
*}
<div id="blogpost">
{if $artefacttitle}<h3>{$artefacttitle|safe}</h3>{/if}
{if $artefacttitle}<h3 class="title">{$artefacttitle|safe}</h3>{/if}
{$artefactdescription|clean_html|safe}
{if isset($attachments)}
<table class="cb attachments fullwidth">
<tbody>
<tr><th colspan="2">{str tag=attachedfiles section=artefact.blog}:</th></tr>
{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"><label>{str tag=tags}:</label> {list_tags owner=$artefact->get('owner') tags=$artefact->get('tags')}</div>{/if}
{foreach from=$attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="iconcell"><img src="{$item->iconpath}" alt=""></td>{/if}
{if $icons}<td class="icon-container"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a> ({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
......
/**
* CSS rules for the blog artefact plugin
*
* Copyright (C) 2006-2012 Catalyst IT
* Copyright (C) 2006-2013 Catalyst IT
* This file is distributed under the same terms as Mahara itself
*/
/* Blog list */
#bloglist h4 {
margin: 0 0 3px 0;
}
#bloglist #blogdesc p {
margin: 0;
font-size: .9167em;
line-height: 1.25em;
}
#blogdescription {
margin: 0 0 10px 0;
margin: 5px 0;
}
#blogdescription p {
margin: 5px 0 0 0;
#bloglist .buttonscell form,
#postlist form {
display: inline;
vertical-align: top;
margin: 0 0 0 5px;
}
#bloglist .buttonscell form, #bloglist .buttonscell form div, #postlist form, #postlist form div {
display: inline;
vertical-align: top;
#bloglist .buttonscell form div,
#postlist form div {
display: inline;
vertical-align: top;
}
/* Post list */
#postlist .poststatus {
font-weight: bold;
font-style: italic;
white-space: nowrap;
margin: 1px 10px 0 10px;
display: block;
float: left;
#blogdescription {
margin: 0 0 10px 0;
}
#postlist .changepoststatus {
font-size: .9167em;
vertical-align: top;
#postlist {
margin: 10px 0 0 0;
}
#postlist .changepoststatus input {