Commit 3b17eeee authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files
parents f09445e7 58d177a2
......@@ -3,37 +3,41 @@
This template displays a list of the user's blogs. The list is populated
using javascript.
*}{include file="header.tpl"}
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="blogs"}</h2>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
<table id="bloglist">
<thead>
<tr>
<th>{str section="artefact.blog" tag="title"}</th>
<th>{str section="artefact.blog" tag="description"}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="blogs"}</h2>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
<table id="bloglist">
<thead>
<tr>
<th>{str section="artefact.blog" tag="title"}</th>
<th>{str section="artefact.blog" tag="description"}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -2,19 +2,23 @@
This template displays the 'new blog' form
*}{include file="header.tpl"}
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newblog"}</h2>
{$newblogform}
</div>
</span></span></span></span></div>
</div>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newblog"}</h2>
{$newblogform}
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -2,21 +2,25 @@
This template displays the 'new blog post' form
*}{include file="header.tpl"}
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newpost"}</h2>
{$newpostform}
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newpost"}</h2>
{$newpostform}
ADD RADIO BUTTONS
</div>
</span></span></span></span></div>
</div>
ADD RADIO BUTTONS
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -2,33 +2,37 @@
This template displays a list of the user's blog posts for a particular blog.
*}{include file="header.tpl"}
<div id="column-right">
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{$blog->get('title')}</h2>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
<table id="postlist">
<thead>
</thead>
<tbody>
</tbody>
</table>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{$blog->get('title')}</h2>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
<table id="postlist">
<thead>
</thead>
<tbody>
</tbody>
</table>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
\ No newline at end of file
......@@ -74,30 +74,35 @@ function FileBrowser(element, changedircallback) {
this.openeditform = function(fileinfo) {
var editrows = [];
var elemid = fileinfo.artefacttype + fileinfo.id;
var editid = 'edit_' + fileinfo.id;
var formid = editid + '_form';
var rowid = 'row_' + fileinfo.id;
var cancelform = function() {
setDisplayForElement(null, rowid);
removeElement(editid);
};
var savebutton = INPUT({'type':'button','value':get_string('savechanges')});
//savebutton.onclick = function () { updatefilemetadata(elemid) };
savebutton.onclick = function () {
sendjsonrequest('updatemetadata.json.php',
{'id':fileinfo.id, 'name':$(formid).name.value,
'description':$(formid).description.value},
function() {cancelform(); self.refresh()});
};
if (fileinfo['artefacttype'] == 'folder') {
editrows = self.folderformrows(fileinfo);
}
else {
editrows = [self.editformtitle(get_string('editfile')),
self.textinputrow('title',fileinfo.title),
self.textinputrow('name',fileinfo.title),
self.textinputrow('description',fileinfo.description)];
}
var editid = 'edit_' + elemid;
var rowid = 'row_'+fileinfo.id;
var cancelbutton = INPUT({'type':'button', 'value':get_string('cancel')});
cancelbutton.onclick = function () {
setDisplayForElement(null, rowid);
removeElement(editid);
}
var cancelbutton = INPUT({'type':'button', 'value':get_string('cancel'), 'onclick':cancelform});
var buttons = TR(null,TD({'colspan':2},savebutton,cancelbutton));
var edittable = TABLE({'align':'center'},TBODY(null,editrows,buttons));
hideElement(rowid);
insertSiblingNodesBefore(rowid, TR({'id':editid},
TD({'colSpan':4},
FORM({'id':editid+'_form','action':''},edittable))));
FORM({'id':formid,'action':''},edittable))));
}
this.showsize = function(bytes) {
......
......@@ -41,6 +41,8 @@ else {
$infolder = ' IS NULL';
}
// todo: do this in the artefact file class.
$prefix = get_config('dbprefix');
$filedata = get_records_sql_array('SELECT a.id, a.artefacttype, a.mtime, f.size, a.title, a.description
FROM ' . $prefix . 'artefact a
......
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span
class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.file" tag="myfiles"}</h2>
<div id="uploader"></div>
<div id="foldernav"></div>
<table id="filelist">
<thead><tr>
<th>Name</th>
<th>Size</th>
<th>Time</th>
<th></th>
</tr></thead>
<tbody><tr><th></th></tr></tbody>
</table>
</div>
</span></span></span></span></div>
</div>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.file" tag="myfiles"}</h2>
<div id="uploader"></div>
<div id="foldernav"></div>
<table id="filelist">
<thead><tr>
<th>Name</th>
<th>Size</th>
<th>Time</th>
<th></th>
</tr></thead>
<tbody><tr><th></th></tr></tbody>
</table>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
<?php
/**
* This program is part of Mahara
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package mahara
* @subpackage artefact-file
* @author Richard Mansfield <richard.mansfield@catalyst.net.nz>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 2006,2007 Catalyst IT Ltd http://catalyst.net.nz
*
*/
define('INTERNAL', 1);
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
log_debug('updatemetadata');
try {
$id = param_integer('id');
$name = param_variable('name');
$description = param_variable('description');
}
catch (ParameterException $e) {
json_reply('missingparameter',get_string('missingparameter'));
}
require_once('artefact.php');
$artefact = artefact_instance_from_id($id);
$artefact->set('title',$name);
$artefact->set('description',$description);
$artefact->commit();
json_reply(false, get_string('changessaved'));
?>
......@@ -5,15 +5,15 @@
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span
class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="profile"}</h2>
{$profileform}
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="profile"}</h2>
{$profileform}
</div>
</span></span></span></span></div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -5,16 +5,16 @@
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span
class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="emailactivation"}</h2>
<p>
{$message|escape}
</p>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="emailactivation"}</h2>
<p>
{$message|escape}
</p>
</div>
</span></span></span></span></div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
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