Commit d807b4ac authored by Sean Brennan's avatar Sean Brennan Committed by Richard Mansfield
Browse files

2nd phase of changing delete and edit to images



Changed more deletes and edits to images.
This does not include changes to the resume creation area.
Signed-off-by: default avatarSean Brennan <sean@catalyst.net.nz>
parent bc8cf9f7
......@@ -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':'button','class':'s icon btn-edit','value':{$getstring['edit']}});
var edit = INPUT({'type':'button','class':'icon btn-big-edit','value':{$getstring['edit']}});
connect(edit, 'onclick', function () { edititem(item); });
var del = INPUT({'type':'button','class':'s icon btn-del','value':{$getstring['delete']}});
var del = INPUT({'type':'button','class':'icon btn-big-del','value':{$getstring['delete']}});
connect(del, 'onclick', function () { delitem(item.id); });
var cells = map(
partial(TD,null),
......
......@@ -570,15 +570,15 @@ class ArtefactTypeComment extends ArtefactType {
}
public static function delete_comment_form($id) {
global $THEME;
return array(
'name' => 'delete_comment',
'renderer' => 'oneline',
'elements' => array(
'comment' => array('type' => 'hidden', 'value' => $id),
'submit' => array(
'type' => 'submit',
'class' => 'quiet',
'name' => 'delete_comment_submit',
'type' => 'image',
'src' => $THEME->get_url('images/icon_close.gif'),
'value' => get_string('delete'),
'confirm' => get_string('reallydeletethiscomment', 'artefact.comment'),
),
......
{foreach from=$data item=item}
<tr class="{cycle name=rows values='r0,r1'}{if $item->highlight} highlight{/if}">
<td>
<div class="fr">
{if $item->canedit}
<form name="edit_{$post->id}" action="{$WWWROOT}artefact/comment/edit.php">
<input type="hidden" name="id" value="{$item->id}">
<input type="hidden" name="view" value="{$viewid}">
<input type="image" src="{theme_url filename="images/edit.gif"}" title="{str tag=edit}">
</form>
{/if}
{if $item->deleteform}{$item->deleteform|safe}{/if}
</div>
{if $item->deletedmessage}
<span class="details">{str tag=commentremoved section=artefact.comment}</span>
{else}
......@@ -29,7 +38,6 @@
{if $.foreach.attachments.first} | <span>{str tag=Attachments section=artefact.comment}:{else},{/if} <a href="{$WWWROOT}artefact/file/download.php?file={$a->attachid}&comment={$item->id}&view={$viewid}">{$a->attachtitle}</a> ({$a->attachsize})</span>
{/foreach}
{/strip}
{if $item->canedit} | <span><a href="{$WWWROOT}artefact/comment/edit.php?id={$item->id}&view={$viewid}" class="btn-edit">{str tag=edit}</a></span>{/if}
{/if}
</div>
</td>
......
......@@ -14,12 +14,6 @@
{/if}
</td>
<td>
{if $moderator}
<div class="s btn-spacer fr">
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id}&amp;returnto=view" class="btn-edit">{str tag="edit"}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id}&amp;returnto=view" class="btn-del">{str tag="delete"}</a>
</div>
{/if}
<div><a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}">{$topic->subject}</a>{if $publicgroup}<a href="{$topic->feedlink}"><img class="feedicon" src="{theme_url filename='images/rss_small.gif'}"></a>{/if}</div>
<div class="s">{$topic->body|str_shorten_html:50:true:false|safe}</div>
</td>
......@@ -28,11 +22,19 @@
<a href="{$WWWROOT}user/view.php?id={$topic->poster}" class="forumuser{if in_array($topic->poster, $groupadmins)} groupadmin{elseif $topic->moderator} moderator{/if}">{$topic->poster|display_name:null:true|escape}</a>
</td>
<td class="center">{$topic->postcount}</td>
<td class="s">
<td>
{if !$topic->lastpostdeleted}
<a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}#post{$topic->lastpost}">{$topic->lastposttime}</a> {str tag=by section=view}
<a href="{$WWWROOT}user/view.php?id={$topic->lastposter}" {if in_array($topic->lastposter, $groupadmins)} class="groupadmin"{elseif $topic->lastpostermoderator} class="moderator"{/if}>{$topic->lastposter|display_name:null:true|escape}</a>
{/if}
</td>
{if $moderator}
<td >
<div class="s btn-spacer fr">
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id}&amp;returnto=view" class="btn-big-edit" title="{str tag="edit"}"></a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id}&amp;returnto=view" class="btn-big-del" title="{str tag="delete"}"></a>
</div>
</td>
{/if}
</tr>
{/foreach}
......@@ -27,6 +27,7 @@
<th>{str tag="Poster" section="interaction.forum"}</th>
<th class="postscount center" width="10%">{str tag="Posts" section="interaction.forum"}</th>
<th class="lastpost" width="20%">{str tag="lastpost" section="interaction.forum"}</th>
<th width="20px"></th>
</tr>
</thead>
{if $stickytopics}
......
......@@ -9,6 +9,6 @@
{/if}
<td class="center">{$group->visibility}</td>
<td class="center s"><a class="icon btn-manage" href="{$WWWROOT}admin/groups/manage.php?id={$group->id}">{str tag="groupmanage" section="admin"}</a></td>
<td class="center s"><a class="icon btn-del" href="{$WWWROOT}admin/groups/delete.php?id={$group->id}">{str tag="groupdelete" section="admin"}</a></td>
<td class="center s"><a class="icon btn-big-del" href="{$WWWROOT}admin/groups/delete.php?id={$group->id}">{str tag="groupdelete" section="admin"}</a></td>
</tr>
{/foreach}
\ No newline at end of file
......@@ -14,8 +14,8 @@
<td class="right">
<form action="" method="post">
<input type="hidden" name="i" value="{$institution->name}">
{if $siteadmin && !$institution->members && $institution->name != 'mahara'}<input type="submit" class="btn-del icon s" name="delete" value="{str tag="delete"}">{/if}
<input type="submit" class="btn-edit icon s" name="edit" value="{str tag="edit"}">
{if $siteadmin && !$institution->members && $institution->name != 'mahara'}<input type="submit" class="btn-big-del icon s" name="delete" value="{str tag="delete"}">{/if}
<input type="submit" class="btn-big-edit icon s" name="edit" value="{str tag="edit"}">
</form>
</td>
<td class="center">{if $institution->suspended}<span class="suspended">{str tag="suspendedinstitution" section=admin}</span>{/if}</td>
......
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