theme_techmania

changeset 8:0c9a90e6fc54 tip

updated blog.atpl in accordance with latest changes to AFoC-blog
author Thomas Jollans <thomas@jollans.com>
date Mon Aug 20 18:06:24 2007 +0200 (2007-08-20)
parents 717d3e7c0816
children
files templates/techmania/blog.atpl
line diff
     1.1 --- a/templates/techmania/blog.atpl	Fri Aug 10 23:57:17 2007 +0200
     1.2 +++ b/templates/techmania/blog.atpl	Mon Aug 20 18:06:24 2007 +0200
     1.3 @@ -2,44 +2,61 @@
     1.4  <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="${afoc:uri}?theme.theme=rss" />
     1.5  $(end)${_html_top}
     1.6  
     1.7 +$(begin if tagname)$(begin set name)${tagname}$(end)$(end)
     1.8  $(begin if name)<div id="heading_one">${name}</div>$(end)
     1.9  
    1.10  $(begin if error)<p class="bad">${error}</p>$(end error)
    1.11  $(begin if prev_page)
    1.12 -<p><a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&blog.page=${prev_page}">« $(xlate blog_prevpage)</a>$(begin if next_page) —
    1.13 -<a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&blog.page=${next_page}">$(xlate blog_nextpage) »</a> $(end if) </p>$(end if)
    1.14 +<p><a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&amp;blog.page=${prev_page}">« $(xlate blog_prevpage)</a>$(begin if next_page) —
    1.15 +<a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&amp;blog.page=${next_page}">$(xlate blog_nextpage) »</a> $(end if) </p>$(end if)
    1.16  
    1.17  $(begin repeat linked)
    1.18  $(begin if type=blog:post)
    1.19 +$(begin tag_if state published)$(set published yes)$(end)
    1.20 +$(begin if _may_admin)$(set published whyNot)$(end)
    1.21 +$(begin if published)
    1.22  
    1.23 -$(begin if admin)
    1.24 +$(begin if _may_admin)
    1.25  <a href="${delete}/${_id}"><img src="${theme:path}/delete.png" alt="del" style="float:right;border:none"/></a> 
    1.26  <a href="${edit}/${_id}"><img src="${theme:path}/edit.png" alt="edit"  style="float:right;border:none"/></a>
    1.27  $(end admin)
    1.28 -<h1><a href="${addr}" class="titlelink" name="nd${_id}">${subject}</a></h1>
    1.29 +<h1><a href="${addr}" class="titlelink" id="nd${_id}">${subject}</a></h1>
    1.30  <p class="authorinfo align-right">
    1.31      $(xlate blog_author) <a href="${cfg:PROFILE_PREFIX}/${uid}">${uname}</a>
    1.32  </p>
    1.33 -<div class="blogpost">${post}</div>
    1.34 +<div class="blogpost">${post}
    1.35 +$(begin tag_if state published)$(end)$(begin else)<br/><br/>
    1.36 +$(xlate blog_unpublished)$(end)
    1.37 +</div>
    1.38  <p class="comments align-right">
    1.39      $(xlate blog_disp_tags)
    1.40 -    $(begin repeat tags)<a href="${addr}">${name}</a>, $(end)
    1.41 +    $(begin repeat tags)<a href="${addr}">${tagname}</a>, $(end)
    1.42      $(xlate blog_date) ${date} :: <a href="${addr}#comments">${_n_linked} $(xlate blog_ncomments)</a>
    1.43  </p>
    1.44  
    1.45 -<a name="comments"></a>
    1.46 +$(begin if linked)
    1.47 +<a id="comments"></a>
    1.48  $(begin repeat linked)
    1.49 -$(begin if admin)
    1.50 +$(begin tag_if state published)$(set cpublished yes)$(end)
    1.51 +$(begin if _may_admin)$(set cpublished yes)$(end)
    1.52 +$(begin if cpublished=yes)
    1.53 +$(begin if _may_admin)
    1.54  <a href="${delete}/${_id}"><img src="${theme:path}/delete.png" alt="del" style="float:right;border:none"/></a> 
    1.55  <a href="${edit}c/${_id}"><img src="${theme:path}/edit.png" alt="edit"  style="float:right;border:none"/></a>
    1.56  $(end admin)
    1.57  <h2>$(begin if email)<a href="mailto:${email}">${author}</a>$(end)$(begin else)${author}$(end) $(begin if website)(<a href="${website}">WWW</a>)$(end) » <strong>${subject}</strong></h2>
    1.58 -<div class="blogpost">${post}</div>
    1.59 +<div class="blogpost">${post}
    1.60 +        $(begin tag_if state published)$(end)$(begin else)<br/><br/>
    1.61 +        $(xlate blog_unpublished)$(end)
    1.62 +</div>
    1.63  <div class="comments align-right">
    1.64              $(xlate blog_date) ${date}</div>
    1.65 +$(end)$(set cpublished no)
    1.66  $(end comments)
    1.67 +$(end)
    1.68  
    1.69 -$(begin if write)
    1.70 +$(begin if !name)
    1.71 +$(begin if _may_write)
    1.72  <h2><strong>$(xlate blog_add_comment)</strong></h2>
    1.73          <form method="post" action="#">
    1.74  		<p>
    1.75 @@ -53,15 +70,17 @@
    1.76  		</p>
    1.77  		</form>
    1.78  $(end if)
    1.79 +$(end if)
    1.80  
    1.81  $(end if)
    1.82 +$(end if)
    1.83  $(end linked)
    1.84  
    1.85  <p>
    1.86  $(begin if prev_page)
    1.87 -<a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&blog.page=${prev_page}">« $(xlate blog_prevpage)</a>$(begin if next_page) —$(end if)$(end if)
    1.88 +<a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&amp;blog.page=${prev_page}">« $(xlate blog_prevpage)</a>$(begin if next_page) —$(end if)$(end if)
    1.89  $(begin if next_page)
    1.90 -<a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&blog.page=${next_page}">$(xlate blog_nextpage) »</a> $(end if)
    1.91 +<a href="$(re_sub afoc:uri "^([^?]*)\\??(.*)$" "\\1?\\2")&amp;blog.page=${next_page}">$(xlate blog_nextpage) »</a> $(end if)
    1.92  </p>
    1.93  
    1.94  ${_html_bottom}