Skip to content

Commit

Permalink
core module retrofit
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Apr 22, 2011
1 parent 05abe79 commit 3948212
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 58 deletions.
61 changes: 31 additions & 30 deletions framework/modules/core/views/expComment/getComments.tpl
@@ -1,5 +1,5 @@
{*
* Copyright (c) 2007-2008 OIC Group, Inc.
* Copyright (c) 2007-2011 OIC Group, Inc.
* Written and Designed by Adam Kessler
*
* This file is part of Exponent
Expand All @@ -18,45 +18,46 @@

{/css}


<div class="exp-comments">
{if !$hidecomments && $comments|@count > 0}
{if $title}<h3>{$title}</h3>{/if}

{if $unapproved > 0}
<div class="unapproved">
There are {$unapproved} comments awaiting approval.
<a href="{link action=manage content_id=$content_id content_type=$content_type}">Click here to manage approvals</a>
</div>
<div class="unapproved">
There are {$unapproved} comments awaiting approval.
<a href="{link action=manage content_id=$content_id content_type=$content_type}">Click here to manage approvals</a>
</div>
{/if}

<ol class="commentlist">
{foreach from=$comments->records item=cmt name=comments}
<li class="comment">
<cite>
<span class="attribution">
{*<a href="{link controller=users action=user_profile id=$cmt->poster}">{$cmt->name}</a> *}
{$cmt->name} says
</span>
<span class="comment-date">{$cmt->created_at|format_date:$smarty.const.DISPLAY_DATE_FORMAT}</span>
</cite>
<div class="comment-text bodycopy">
{*avatar userid=$cmt->poster w=100 <-- we'll get back to you*}

{permissions}
{permissions}
{if $permissions.manage == 1}
{icon img=edit.png action=edit id=$cmt->id title="Edit Comment"}
{/if}
{if $permissions.delete == 1}
{icon img=delete.png action=delete id=$cmt->id title="Delete Comment" onclick="return confirm('Are you sure you want to delete this comment?');"}
{/if}
{/permissions}
{/permissions}
<li class="comment">
<cite>
<span class="attribution">
{*<a href="{link controller=users action=user_profile id=$cmt->poster}">{$cmt->name}</a> *}
{$cmt->name} says
</span>
<span class="comment-date">{$cmt->created_at|format_date:$smarty.const.DISPLAY_DATE_FORMAT}</span>
</cite>
<div class="comment-text bodycopy">
{*avatar userid=$cmt->poster w=100 <-- we'll get back to you*}

{permissions}
{permissions}
<div class="item-actions">
{if $permissions.manage == 1}
{icon action=edit record=$cmt title="Edit Comment"}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$cmt title="Delete Comment" onclick="return confirm('Are you sure you want to delete this comment?');"}
{/if}
<div>
{/permissions}
{/permissions}

{$cmt->body}
</div>
</li>
{$cmt->body}
</div>
</li>
{/foreach}
</ol>
{*$comments->links* <-- We'll need to fix pagination*}
Expand Down
8 changes: 5 additions & 3 deletions framework/modules/core/views/expComment/manage.tpl
@@ -1,5 +1,5 @@
{*
* Copyright (c) 2004-2008 OIC Group, Inc.
* Copyright (c) 2004-2011 OIC Group, Inc.
* Written and Designed by Adam Kessler
*
* This file is part of Exponent
Expand Down Expand Up @@ -42,8 +42,10 @@
<td>{$comment->name}</td>
<td>{$comment->body}</td>
<td>
{icon img=edit.png action=approve id=$comment->id title="Edit Comment"}
{icon img=delete.png action=delete id=$comment->id title="Delete Comment" onclick="return confirm('Are you sure you want to delete this comment?');"}
<div class="item-actions">
{icon class="edit" action=approve record=$comment title="Edit Comment"}
{icon action=delete record=$comment title="Delete Comment" onclick="return confirm('Are you sure you want to delete this comment?');"}
</div>
</td>
</tr>
{foreachelse}
Expand Down
7 changes: 4 additions & 3 deletions framework/modules/core/views/expHTMLEditor/manage.tpl
Expand Up @@ -17,7 +17,6 @@

{/css}


<div class="module administration htmleditoranager">
<div class="info-header">
<div class="related-actions">
Expand Down Expand Up @@ -70,8 +69,10 @@
<a href="{link action="preview" id=$cfg->id}">{$cfg->name}</a>
</td>
<td>
{icon action=edit id=$cfg->id}
{icon action=delete id=$cfg->id}
<div class="item-actions">
{icon action=edit record=$cfg}
{icon action=delete record=$cfg}
</div>
</td>
</tr>
{/foreach}
Expand Down
40 changes: 21 additions & 19 deletions framework/modules/core/views/expSimpleNote/getNotes.tpl
@@ -1,5 +1,5 @@
{*
* Copyright (c) 2007-2008 OIC Group, Inc.
* Copyright (c) 2007-2011 OIC Group, Inc.
* Written and Designed by Adam Kessler
*
* This file is part of Exponent
Expand Down Expand Up @@ -27,24 +27,26 @@

<ol class="notelist">
{foreach from=$simplenotes->records item=note name=simplenote}
<li class="note">
<cite>
<span class="comment-data">{$note->edited_at|format_date:$smarty.const.DISPLAY_DATETIME_FORMAT}</span> - <span class="attribution">{$note->name}</span>
</cite>
{permissions}
{permissions}
{if $permissions.manage == 1}
{icon img=edit.png action=edit id=$note->id tab=$tab content_id=$content_id content_type=$content_type title="Edit Note"}
{/if}
{if $permissions.delete == 1}
{icon img=delete.png action=delete id=$note->id tab=$tab content_id=$content_id content_type=$content_type title="Delete Note" onclick="return confirm('Are you sure you want to delete this note?');"}
{/if}
{/permissions}
{/permissions}
<div class="note-text bodycopy">
{$note->body}
</div>
</li>
<li class="note">
<cite>
<span class="comment-data">{$note->edited_at|format_date:$smarty.const.DISPLAY_DATETIME_FORMAT}</span> - <span class="attribution">{$note->name}</span>
</cite>
{permissions}
{permissions}
<div class="item-actions">
{if $permissions.manage == 1}
{icon action=edit record=$note tab=$tab content_id=$content_id content_type=$content_type title="Edit Note"}
{/if}
{if $permissions.delete == 1}
{icon action=delete record=$note tab=$tab content_id=$content_id content_type=$content_type title="Delete Note" onclick="return confirm('Are you sure you want to delete this note?');"}
{/if}
</div>
{/permissions}
{/permissions}
<div class="note-text bodycopy">
{$note->body}
</div>
</li>
{/foreach}
</ol>
{$simplenotes->links}
Expand Down
8 changes: 5 additions & 3 deletions framework/modules/core/views/expSimpleNote/manage.tpl
@@ -1,5 +1,5 @@
{*
* Copyright (c) 2004-2008 OIC Group, Inc.
* Copyright (c) 2004-2011 OIC Group, Inc.
* Written and Designed by Adam Kessler
*
* This file is part of Exponent
Expand Down Expand Up @@ -42,8 +42,10 @@
<td>{$simplenote->name}</td>
<td>{$simplenote->body}</td>
<td>
{icon img=edit.png action=approve id=$simplenote->id tab=$tab title="Edit Note"}
{icon img=delete.png action=delete id=$simplenote->id tab=$tab title="Delete note" onclick="return confirm('Are you sure you want to delete this note?');"}
<div class="item-actions">
{icon class="edit" action=approve record=$simplenote tab=$tab title="Edit Note"}
{icon action=delete record=$simplenote tab=$tab title="Delete note" onclick="return confirm('Are you sure you want to delete this note?');"}
</div>
</td>
</tr>
{foreachelse}
Expand Down

0 comments on commit 3948212

Please sign in to comment.