[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gallery-checkins
Subject:    [Gallery-checkins] CVS: gallery2/modules/comment/templates ItemDetails.tpl,NONE,1.1 ShowCommentsHead
From:       Bharat Mediratta <bharat () users ! sourceforge ! net>
Date:       2002-10-29 7:14:15
[Download RAW message or body]

Update of /cvsroot/gallery/gallery2/modules/comment/templates
In directory usw-pr-cvs1:/tmp/cvs-serv17238/modules/comment/templates

Modified Files:
	ShowComments.tpl 
Added Files:
	ItemDetails.tpl ShowCommentsHead.tpl 
Log Message:

* Fleshed out the comment details code as a test case for how module details will
  work.  Now we display the 3 most recent comments when viewing the item, and
  provide a link to the rest of them.

* Added ThinFrame to the theme code



--- NEW FILE ---
  {if !empty($comments)}
  <table width="100%" border="0" cellspacing="4" cellpadding="0">
    {if sizeof($comments) < $totalComments }
    <tr>
      <td align="center">
	{galleryBigFont}
	{galleryText text="Recent comments"}
	{/galleryBigFont}
	{gallerySmallFont}
	<a href="{galleryUrl view="comment:ShowComments" itemId=$itemId}">
	  {galleryText text="(view all %d comments)" arg1=$totalComments}
	</a>
	{/gallerySmallFont}
      </td>
    </tr>
    {/if}
    {foreach from=$comments item=comment}
    <tr>
      <td width="100%">
	{galleryLightFrame width="100%"}
	{galleryHighlight1}
	{galleryBigFont}
	{$comment.commenter.userName}
	{/galleryBigFont}
	<br>
	{galleryDate timestamp=$comment.date format="%e-%b-%Y %H:%M"}
	{/galleryHighlight1}
	{galleryHighlight2}
	{$comment.comment}
	{/galleryHighlight2}
	{/galleryLightFrame}
      </td>
    </tr>
    {/foreach}
  </table>
  {/if}

--- NEW FILE ---
{if empty($item.title)}
{assign var="title" value=$item.pathComponent}
{else}
{assign var="title" value=$item.title}
{/if}

<title>
{galleryText text="Comments for %s" arg1=$title}
</title>
{galleryStyle}


Index: ShowComments.tpl
===================================================================
RCS file: /cvsroot/gallery/gallery2/modules/comment/templates/ShowComments.tpl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ShowComments.tpl	28 Oct 2002 18:51:03 -0000	1.1
+++ ShowComments.tpl	29 Oct 2002 07:14:13 -0000	1.2
@@ -1,3 +1,23 @@
+  <center>
+    {if !empty($thumbnail)}
+    <img src="{galleryUrl view='core:DownloadItem' itemId=$thumbnail.id}"
+      {if $thumbnail.width} width="{$thumbnail.width}" {/if}
+      {if $thumbnail.height} height="{$thumbnail.height}" {/if}
+      >
+      {else}
+      {galleryBigFont}
+      {galleryText text="There is no thumbnail for this item"}
+      {/galleryBigFont}
+    {/if}
+    <br>
+    <a href="{galleryUrl view="core:ShowItem" itemId=$itemId}">
+    {galleryText text="Return to item view"}
+    </a>
+  </center>
+      
+  {if empty($comments)}
+  {galleryText text="There are no comments for this item"}
+  {else}
   <table width="100%" border="0" cellspacing="4" cellpadding="0">
     {foreach from=$comments item=comment}
     <tr>
@@ -18,3 +38,4 @@
     </tr>
     {/foreach}
   </table>
+  {/if}



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
__[ g a l l e r y - c h e c k i n s ]_________________________

[ list info/archive --> http://gallery.sf.net/lists.php ]
[ gallery info/FAQ/download --> http://gallery.sf.net ]
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic