added safe top link to the top of the CS FAQ template

This commit is contained in:
Colin Kuskie 2007-02-03 22:54:21 +00:00
parent b49c5bf2a1
commit 7323ec0c0a
5 changed files with 80 additions and 0 deletions

View file

@ -56,6 +56,7 @@
- fix: RSS feeds should now process HTML characters properly for RSS 2.0 standard
- fix: Corner case which could cause WeatherData.pm to fail has been fixed.
- fix: wiki pagination broken (perlDreamer Consulting, LLC)
- fix: Collab System FAQ: clicking top link does not bring you back to the top of FAQ (perlDreamer Consulting, LLC)
7.3.8
- Fixed a template variable rewriting problem with HTML::Template::Expr

View file

@ -0,0 +1,70 @@
#PBtmpl0000000000000080
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
<tmpl_if session.var.adminOn>
<tmpl_var controls>
</tmpl_if>
<tmpl_if displayTitle>
<h2><tmpl_var title></h2>
</tmpl_if>
<tmpl_if description>
<tmpl_var description>
</tmpl_if>
<p>
<tmpl_if user.canPost>
<a href="<tmpl_var add.url>"><tmpl_var add.label></a> &bull;
</tmpl_if>
<tmpl_unless user.isVisitor>
<tmpl_if user.isSubscribed>
<a href="<tmpl_var unsubscribe.url>"><tmpl_var unsubscribe.label></a>
<tmpl_else>
<a href="<tmpl_var subscribe.url>"><tmpl_var subscribe.label></a>
</tmpl_if>
<tmpl_if pagination.pageCount.isMultiple>
&bull;
</tmpl_if>
</tmpl_unless>
<tmpl_if pagination.pageCount.isMultiple>
<a href="<tmpl_var search.url>"><tmpl_var search.label></a>
</tmpl_if>
</p>
<ul>
<tmpl_loop post_loop>
<li><a href="#id<tmpl_var assetId>"><span class="faqQuestion"><tmpl_var title></span></a></li>
</tmpl_loop>
</ul>
<tmpl_loop post_loop>
<tmpl_if user.isPoster>
<tmpl_unless session.var.adminOn>
<div>[<a href="<tmpl_var edit.url>"><tmpl_var edit.label></a>]</div>
</tmpl_unless>
</tmpl_if>
<tmpl_if user.isModerator>
<div>
<tmpl_if session.var.adminOn>
<tmpl_var controls>
<tmpl_else>
<tmpl_unless user.isPoster>
<tmpl_unless session.var.adminOn>
[<a href="<tmpl_var edit.url>"><tmpl_var edit.label></a>]
</tmpl_unless>
</tmpl_unless>
</tmpl_if>
(<a href="<tmpl_var url>"><tmpl_var status></a>)
</div>
</tmpl_if>
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a><span class="faqQuestion"><tmpl_var title></span><br />
<tmpl_var content>
<p><a href="#id<tmpl_var collaborationAssetId>">[top]</a></p>
</tmpl_loop>
<tmpl_if pagination.pageCount.isMultiple>
<div class="pagination">
<tmpl_var pagination.previousPage> &#183; <tmpl_var pagination.pageList.upTo10> &#183; <tmpl_var pagination.nextPage>
</div>
</tmpl_if>

View file

@ -1098,6 +1098,7 @@ sub view {
$var{"search.url"} = $self->getSearchUrl;
$var{"subscribe.url"} = $self->getSubscribeUrl;
$var{"unsubscribe.url"} = $self->getUnsubscribeUrl;
$var{"collaborationAssetId"} = $self->getId;
my $sql = "
select
asset.assetId,

View file

@ -255,6 +255,9 @@ our $HELP = {
{
'name' => 'closed.label'
},
{
'name' => 'collaborationAssetId'
},
{
'name' => 'critical.label'
},

View file

@ -1617,6 +1617,11 @@ the Collaboration Asset, the user will be notified.|,
lastUpdated => 1149656374,
},
'collaborationAssetId' => {
message => q|The assetId of this Collaboration System. Unlike the variable assetId, this one will not be overridden by the assetIds inside of Threads or Posts.|,
lastUpdated => 1170543345,
},
};