Commit d4c7762c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Merge branch 'theme-editview'

parents 3f98f87f fd52cea0
......@@ -192,7 +192,7 @@ $prefsform = array(
'jsform' => true,
'plugintype' => 'core',
'pluginname' => 'account',
'jssuccesscallback' => 'clearPasswords',
'jssuccesscallback' => 'accountPrefsSuccess',
'elements' => $elements
);
......@@ -266,14 +266,19 @@ function accountprefs_submit(Pieform $form, $values) {
update_send_count($u,true);
}
$returndata = array();
if (isset($values['multipleblogs'])) {
if ((bool) $USER->get_account_preference('multipleblogs') !== (bool) $values['multipleblogs']) {
$returndata['multipleblogs'] = $values['multipleblogs'] ? 'on' : 'off'; // Rewrite the blogs link in the menu
}
}
foreach (array_keys($expectedprefs) as $pref) {
if (isset($values[$pref])) {
$USER->set_account_preference($pref, $values[$pref]);
}
}
$returndata = array();
if (isset($values['username']) && $values['username'] != $USER->get('username')) {
$USER->username = $values['username'];
$USER->commit();
......@@ -293,7 +298,7 @@ $smarty = smarty();
$smarty->assign('form', $prefsform);
$smarty->assign('candeleteself', $USER->can_delete_self());
$smarty->assign('INLINEJAVASCRIPT', "
function clearPasswords(form, data) {
function accountPrefsSuccess(form, data) {
formSuccess(form, data);
if ($('accountprefs_oldpassword')) {
$('accountprefs_oldpassword').value = '';
......@@ -304,6 +309,14 @@ function clearPasswords(form, data) {
var username = getFirstElementByTagAndClassName('a', null, 'profile-sideblock-username');
replaceChildNodes(username, data.username);
}
if (data.multipleblogs) {
var newhref = data.multipleblogs == 'on' ? 'artefact/blog/' : 'artefact/blog/view/';
forEach(getElementsByTagAndClassName('a', null, 'main-nav'), function (link) {
if (getNodeAttribute(link, 'href').match(new RegExp('/artefact/blog/'))) {
setNodeAttribute(link, 'href', config.wwwroot + newhref);
}
});
}
}
");
$smarty->assign('PAGEHEADING', TITLE);
......
<?php
/**
* Mahara: Electronic portfolio, weblog, resume builder and social networking
* Copyright (C) 2006-2009 Catalyst IT Ltd and others; see:
* http://wiki.mahara.org/Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package mahara
* @subpackage core
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006-2009 Catalyst IT Ltd http://catalyst.net.nz
*
*/
define('INTERNAL', 1);
define('ADMIN', 1);
define('MENUITEM', 'configsite/share');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
require_once(get_config('libroot') . 'view.php');
define('TITLE', get_string('share', 'view'));
$accesslists = View::get_accesslists(null, null, 'mahara');
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('accesslists', $accesslists);
$smarty->display('view/share.tpl');
......@@ -44,7 +44,7 @@ define('TITLE', $title);
$createviewform = pieform(create_view_form(null, 'mahara'));
$smarty = smarty(array('jquery', 'myviews'));
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$data = View::get_myviews_data($limit, $offset, null, 'mahara');
......
<tr>
<td style="width: 20px;" rowspan="2">
<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>
......
......@@ -8,17 +8,17 @@
{foreach from=$blogs->data item=blog}
<tr class="{cycle name=rows values='r0,r1'}">
<td>
<div><strong><a href="{$WWWROOT}artefact/blog/view/?id={$blog->id}">{$blog->title}</a></strong></div>
<div>{$blog->description|clean_html|safe}</div>
<h4><a href="{$WWWROOT}artefact/blog/view/?id={$blog->id}">{$blog->title}</a></h4>
<div id="blogdesc">{$blog->description|clean_html|safe}</div>
</td>
<td class="right">
<a href="{$WWWROOT}artefact/blog/view/?id={$blog->id}">{$blog->postcount} {if $blog->postcount == 1}{str tag=post section=artefact.blog}{else}{str tag=posts section=artefact.blog}{/if}</a>
<a href="{$WWWROOT}artefact/blog/post.php?blog={$blog->id}" class="btn-add">{str tag=addpost section=artefact.blog}</a>
<td class="valign"><a href="{$WWWROOT}artefact/blog/view/?id={$blog->id}">{$blog->postcount} {if $blog->postcount == 1}{str tag=post section=artefact.blog}{else}{str tag=posts section=artefact.blog}{/if}</a></td>
<td class="valign s"><a href="{$WWWROOT}artefact/blog/post.php?blog={$blog->id}" class="btn">{str tag=addpost section=artefact.blog}</a></td>
<td class="valign buttonscell right">
{if $blog->locked}
<span class="s dull">{str tag=submittedforassessment section=view}</span>
{else}
<a href="{$WWWROOT}artefact/blog/settings/?id={$blog->id}" class="btn-big-edit" title="{str tag=settings}"></a>
<a href="#" onClick="confirmdelete({$blog->id});" class="btn-big-del" title="{str tag=delete}"></a>
<a href="{$WWWROOT}artefact/blog/settings/?id={$blog->id}" title="{str tag=settings}"><img src="{theme_url filename='images/manage.gif'}" alt="{str tag=settings}"></a>
<a href="#" onClick="confirmdelete({$blog->id});" title="{str tag=delete}"><img src="{theme_url filename='images/icon_close.gif'}" alt="{str tag=delete}"></a>
{/if}
</td>
</tr>
......
......@@ -25,7 +25,7 @@
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td class="nowrap"><label for="img_src">{str section=artefact.blog tag=src}</label></td>
<td><input id="img_src" name="img_src" type="text" value="" style="width: 200px" onchange="this.form.src.value=this.value;ImageDialog.getImageData();" onmouseup="this.onchange();" onkeyup="this.onchange();"/></td>
<td><input id="img_src" name="img_src" type="text" value="" style="width: 200px" onChange="this.form.src.value=this.value;ImageDialog.getImageData();" onMouseUp="this.onchange();" onKeyUp="this.onchange();"/></td>
</tr>
<!-- Image list -->
<tr>
......@@ -74,11 +74,11 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<div class="fl">
<input type="button" id="insert" class="submit" name="insert" value="{str section=artefact.blog tag=insert}" onClick="ImageDialog.update();return false;" />
</div>
<div style="float: right">
<div class="fr">
<input type="button" id="cancel" class="cancel" name="cancel" value="{str section=artefact.blog tag=cancel}" onClick="tinyMCEPopup.close();" />
</div>
</div>
......
{foreach from=$posts item=post}
<tr id="posttitle_{$post->id}">
<th class="posttitle">{$post->title}</th>
<th id="poststatus{$post->id}">
<th id="poststatus{$post->id}" class="poststatus">
{if $post->published}
{str tag=published section=artefact.blog}
{else}
......@@ -36,8 +36,8 @@
{foreach from=$post->files item=file}
<tr class="{cycle values='r1,r0'}">
<td><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>
<td class="valign"><a href="{$WWWROOT}artefact/file/download.php?file={$file->attachment}">{$file->title}</a></td>
<td class="valign">{$file->description}</td>
</tr>
{/foreach}
</tbody>
......
......@@ -11,7 +11,7 @@
{if $artefact->get('tags')}<div class="tags">{str tag=tags}: {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 style="width: 22px;"><img src="{$item->iconpath}" alt=""></td>{/if}
{if $icons}<td class="iconcell"><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>
......
......@@ -13,8 +13,18 @@
#bloglist td .addicon {
margin: 0;
}
#bloglist td div.postcontrols {
min-width: 12.5em;
#bloglist h4 {
margin: 0;
}
#bloglist #blogdesc p {
margin: 0;
font-size: .9167em;
}
#blogdescription {
margin: 0 0 10px 0;
}
#blogdescription p {
margin: 0;
}
td a.btn-add{
margin-left:10px;
......@@ -24,17 +34,23 @@ td a.btn-add{
#postlist th {
border-bottom: 1px dotted #d1d1d1;
font-size: 1em;
padding: 1em 0 .25em 0;
padding: 15px 5px 3px 5px;
vertical-align: bottom;
}
#postlist td {
padding: .25em 0;
}
#postlist th.posttitle {
font-size: 1.8em;
line-height: 1.1667em;
}
#postlist th.poststatus {
color: #888;
white-space: nowrap;
}
#postlist th.poststatus input {
font-size: .9167em;
}
#postlist th.controls {
text-align: right;
width: 35px;
}
#postlist th.controls .btn-big-del {
background:url("../images/delete.gif") no-repeat scroll left center transparent;
......@@ -43,7 +59,7 @@ td a.btn-add{
cursor:pointer;
font-size:1%;
height:16px;
margin-left:0.5em;
margin-left: 5px;
padding-left:0;
width:16px;
}
......@@ -55,34 +71,31 @@ td a.btn-add{
display: inline;
}
#postlist p {
margin: 0 0 1em 0;
margin: 0 0 10px 0;
}
#postlist td.postdetails {
font-size: .9167em;
color: #888;
padding-bottom: 1em;
padding-bottom: 10px;
}
#postlist td h1,
#postlist td h2 {
font-size: 1.3333em !important;
margin: 1em 0 0 0;
margin: 10px 0 0 0;
}
#postlist td h3,
#postlist td h4 {
font-size: 1.1333em !important;
margin: 1em 0 0 0;
margin: 10px 0 0 0;
}
/* attachment files */
#postlist .attachments th {
padding: .25em .5em;
padding: 3px 5px;
font-size: 1em;
border: 0;
}
#postlist .attachments td {
padding: .25em .5em;
}
.attachments .unselect {
font-size: .9167em;
}
......
......@@ -8,8 +8,8 @@
<a class="btn" href="{$WWWROOT}artefact/blog/post.php?blog={$blog->get('id')}">{str section="artefact.blog" tag="addpost"}</a>
</div>
<p>{clean_html($blog->get('description'))|safe}</p>
{if $blog->get('tags')}<p class="tags"><label>{str tag=tags}:</label> {list_tags owner=$blog->get('owner') tags=$blog->get('tags')}</p>{/if}
<div id="blogdescription"><p>{clean_html($blog->get('description'))|safe}</p>
{if $blog->get('tags')}<p class="tags s"><label>{str tag=tags}:</label> {list_tags owner=$blog->get('owner') tags=$blog->get('tags')}</p>{/if}</div>
{if $posts}
<table id="postlist" class="tablerenderer fullwidth nohead">
......
{foreach $files file}
<div title="{$file.title}">
<div class="filedownload-item" title="{$file.title}">
<div class="fl"><a href="{$file.downloadurl}" target="_blank"><img src="{$file.iconsrc}" alt=""></a></div>
<div style="margin-left: 40px;">
<div style="margin-left: 30px;">
<h4><a href="{$file.downloadurl}" target="_blank">{$file.title|str_shorten_text:20}</a></h4>
{if $file.description}<p>{$file.description}</p>{/if}
<div class="description">{$file.size|display_size} | {$file.ctime|format_date:'strftimedaydate'}
......
......@@ -17,7 +17,7 @@
<tbody>
{foreach from=$children item=child}
<tr class="{cycle values='r0,r1'}">
<td><img src="{$child->iconsrc}" border="0" alt="{$child->artefacttype}"></td>
<td class="iconcell"><img src="{$child->iconsrc}" border="0" alt="{$child->artefacttype}"></td>
<td><a href="{$WWWROOT}view/artefact.php?artefact={$child->id}&amp;view={$viewid}" title="{$child->hovertitle}">{$child->title}</a></td>
<td class="s">{$child->description}</td>
{if !$simpledisplay}
......
<tr id="{$prefix}_edit_row"{if !$fileinfo} class="hidden"{/if}>
<tr id="{$prefix}_edit_row"{if !$fileinfo} class="hidden editrow"{/if}>
<td></td>
<td colspan="5">
<td colspan="5" class="fileedittablewrap">
<table class="fileedittable">
<tbody>
<tr>
......
......@@ -78,17 +78,16 @@
<input type="hidden" name="{$prefix}_move" id="{$prefix}_move" value="" />
<input type="hidden" name="{$prefix}_moveto" id="{$prefix}_moveto" value="" />
{/if}
<div id="{$prefix}_foldernav" class="foldernav">
{include file="artefact:file:form/folderpath.tpl" path=$path querybase=$querybase owner=$tabs.owner ownerid=$tabs.ownerid}
</div>
{if $config.createfolder}
<div id="{$prefix}_createfolder_messages" class="createfolder-message"></div>
<div class="fr">
<input type="text" class="text" name="{$prefix}_createfolder_name" id="{$prefix}_createfolder_name" size="40" />
<input type="submit" class="submit" name="{$prefix}_createfolder" id="{$prefix}_createfolder" value="{str tag=createfolder section=artefact.file}" />
</div>
{/if}
<div id="{$prefix}_foldernav" class="foldernav">
{include file="artefact:file:form/folderpath.tpl" path=$path querybase=$querybase owner=$tabs.owner ownerid=$tabs.ownerid}
</div>
<div id="{$prefix}_filelist_container">
{include file="artefact:file:form/filelist.tpl" prefix=$prefix filelist=$filelist editable=$config.edit selectable=$config.select highlight=$highlight edit=$edit querybase=$querybase groupinfo=$groupinfo owner=$tabs.owner ownerid=$tabs.ownerid selectfolders=$config.selectfolders showtags=$config.showtags editmeta=$config.editmeta}
......
......@@ -24,7 +24,7 @@
{foreach from=$filelist item=file}
{if !$publishing || !$file->permissions || $file->can_republish}{assign var=publishable value=1}{else}{assign var=publishable value=0}{/if}
<tr id="file:{$file->id}" class="{cycle values='r0,r1'} directory-item{if $file->isparent} parentfolder{/if}{if $file->artefacttype == 'folder'} folder{/if}{if $highlight && $highlight == $file->id} highlight-file{/if}{if $edit == $file->id} hidden{/if}{if !$publishable && $file->artefacttype != 'folder'} disabled{/if}" {if !$publishable && $file->artefacttype != 'folder'} title="{str tag=notpublishable section=artefact.file}"{/if}>
<td>
<td class="filethumb">
{if $editable}
<div{if !$file->isparent} class="icon-drag" id="drag:{$file->id}"{/if}>
<img src="{$file->icon}"{if !$file->isparent} title="{str tag=clickanddragtomovefile section=artefact.file arg1=$file->title}"{/if}>
......@@ -43,16 +43,16 @@
<a href="{$WWWROOT}artefact/file/download.php?file={$file->id}" target="_blank" title="{str tag=downloadfile section=artefact.file arg1=$displaytitle}">{$displaytitle}</a>
{/if}
</td>
<td>{$file->description}</td>
<td class="filedescription">{$file->description}</td>
{if !$showtags && !$editmeta}
<td>{tif $file->size ?: ''}</td>
<td>{tif $file->mtime ?: ''}</td>
<td class="filesize">{tif $file->size ?: ''}</td>
<td class="filedate">{tif $file->mtime ?: ''}</td>
{/if}
{if $showtags}
<td>{if $file->tags}<span>{list_tags tags=$file->tags owner=$showtags}</span>{/if}</td>
<td class="filetags">{if $file->tags}<span>{list_tags tags=$file->tags owner=$showtags}</span>{/if}</td>
{/if}
{if $editmeta}
<td class="right">
<td class="right s">
{if $file->locked}
<span class="s dull">{str tag=Submitted section=view}</span>
{elseif !$file->isparent}
......@@ -60,7 +60,7 @@
{/if}
</td>
{/if}
<td class="right">
<td class="right s">
{if $editable && !$file->isparent}
{if $file->artefacttype == 'archive'}<a href="{$WWWROOT}artefact/file/extract.php?file={$file->id}">{str tag=Unzip section=artefact.file}</a>{/if}
{if $file->locked}
......
......@@ -12,14 +12,14 @@
{foreach from=$selectedlist item=file}
{assign var=displaytitle value=$file->title|str_shorten_text:34|safe}
<tr class="{cycle values='r0,r1'}{if $highlight && $highlight == $file->id} highlight-file{/if}">
<td>
<td class="iconcell">
<img src="{if $file->artefacttype == 'image'}{$WWWROOT}artefact/file/download.php?file={$file->id}&size=20x20{else}{theme_url filename=images/`$file->artefacttype`.gif}{/if}">
</td>
<td>
<td class="valign">
<a href="{$WWWROOT}artefact/file/download.php?file={$file->id}" target="_blank" title="{str tag=downloadfile section=artefact.file arg1=$displaytitle}">{$displaytitle}</a>
</td>
<td>{$file->description}</td>
<td>
<td class="valign">{$file->description}</td>
<td class="right">
<input type="submit" class="button submit s unselect" name="{$prefix}_unselect[{$file->id}]" value="{str tag=remove}" />
<input type="hidden" name="{$prefix}_selected[{$file->id}]" value="{$file->id}">
</td>
......
......@@ -16,11 +16,15 @@
.fileupload {
background: #eee;
border: 1px solid #d1d1d1;
margin-bottom: 1em;
margin-bottom: 10px;
width: 100%;
}
* html .fileupload {
width: 98%;
}
.fileupload th {
text-align: left;
padding-left: 1em;
padding-left: 10px !important;
}
.fileupload th label,
.uploadform th label {
......@@ -31,32 +35,59 @@
font-size: .9167em;
line-height: 1.3333em;
}
.fileupload td#files_filebrowser_upload_messages,
.fileupload td#editpost_filebrowser_upload_messages {
padding: 0;
}
.createfolder-message div {
margin-bottom: .5em;
margin-bottom: 3px;
}
#createfolder {
background-color: #E7E7E7;
padding: 3px 5px;
}
/* folder nav */
.foldernav {
font-weight: bold;
padding: 0 0 0 20px;
padding: 1px 0 0 20px;
font-size: 1.3333em;
background: url(../images/foldernav_small.png) no-repeat left;
background: url(../images/foldernav_small.png) no-repeat left top;
}
form#files .foldernav {
padding: 0 0 0 30px;
padding: 5px 0 3px 30px;
font-size: 1.3333em;
background: url(../images/foldernav.png) no-repeat left;
background: url(../images/foldernav.png) no-repeat left top;
}
td.filethumb {
width: 25px;
vertical-align: middle;
}
td.filename {
padding: 7px 5px 3px 5px !important;
}
td.filedescription {
padding: 7px 5px 3px 5px!important;
font-size: .9167em;
}
td.filesize {
padding: 7px 5px 3px 5px!important;
font-size: .9167em;
}
td.filedate {
padding: 7px 5px 3px 5px!important;
font-size: .9167em;
color: #888888;
}
td.filetags {
padding: 7px 5px 3px 5px!important;
font-size: .9167em;
}
/* File list */
.filelist {
width: 100%;
* width: 96%;
}
* html .filelist {
width: 98%;
}
.filelist th {
border-bottom: 1px solid #CCCCCC;
......@@ -64,10 +95,6 @@ form#files .foldernav {
.filelist table th {
border-bottom: 0;
}
.filelist td.right input {
font-size: .9167em;
font-family: Arial, Helvetica, sans-serif;
}
.filelist td.right input.btn-big-del {
font-size: 1%;
}
......@@ -103,11 +130,16 @@ tr.folderhover a {
cursor: move;
}
/* File list edit box */
#files_filebrowser_edit_row td.fileedittablewrap {
padding-left: 0;
}
#files_filebrowser_edit_row #files_filebrowser_edit_heading {
font-size: 1.3333em;
padding-bottom: 0;
}
#files_filebrowser_edit_row table th {
border: 0;
text-align: left;
}
#files_filebrowser_edit_row table th label {
font-weight: bold;
......@@ -118,11 +150,11 @@ tr.folderhover a {
/* Edit post File list */
#editpost_filebrowser_upload_container {
margin-top: 1em;
margin-top: 10px;
}
#editpost_filebrowser_upload_browse,
#editpost_filebrowser_open_upload_browse_container {
padding: 1em;
padding: 10px;
border-top: 1px solid #eee;
border-right: 1px solid #eee;
border-bottom: 4px solid #eee;
......
<tr>
<td style="width: 20px;" rowspan="2">
<td class="iconcell" rowspan="2">
{$formcontrols|safe}
</td>
<th><label for="{$elementname}_{$artefact->id}" title="{$artefact->title|strip_tags|str_shorten_text:60:true|safe}">{str tag=$artefact->artefacttype section=artefact.internal}</label></th>
......
......@@ -23,7 +23,7 @@ input#myfriends_addfriend_add {
#email_list a {
color: #ca0000;
text-decoration: none;
margin-left: .5em;
margin-left: 5px;
}
#profileform_email_container a {
font-size: .9167em;
......
<tr>
<td style="width: 20px;" rowspan="2">
<td class="iconcell" rowspan="2">
{$formcontrols|safe}
</td>