Apply the UI enhancement of issue tags cloud to wiki and download part too.

This commit is contained in:
William MARTIN 2011-02-23 22:35:43 +01:00
parent cdedaa4604
commit 6f1bb309d4
8 changed files with 19 additions and 32 deletions

View File

@ -71,12 +71,10 @@ class IDF_Views_Download
$pag->no_results_text = __('No downloads were found.');
$pag->sort_order = array('creation_dtime', 'DESC');
$pag->setFromRequest($request);
$tags = $prj->getTagCloud('downloads');
return Pluf_Shortcuts_RenderToResponse('idf/downloads/index.html',
array(
'page_title' => $title,
'downloads' => $pag,
'tags' => $tags,
'deprecated' => count($ids),
'dlabel' => $dtag,
),

View File

@ -71,8 +71,7 @@ class IDF_Views_Issue
'page_title' => $title,
'open' => $open,
'closed' => $closed,
'issues' => $pag,
'cloud' => 'issues');
'issues' => $pag);
if ($api) return $params;
return Pluf_Shortcuts_RenderToResponse('idf/issues/index.html',
$params, $request);

View File

@ -67,12 +67,10 @@ class IDF_Views_Wiki
$pag->no_results_text = __('No documentation pages were found.');
$pag->sort_order = array('title', 'ASC');
$pag->setFromRequest($request);
$tags = $prj->getTagCloud('wiki');
return Pluf_Shortcuts_RenderToResponse('idf/wiki/index.html',
array(
'page_title' => $title,
'pages' => $pag,
'tags' => $tags,
'deprecated' => count($ids),
'dlabel' => $dtag,
),

View File

@ -9,13 +9,8 @@
{/block}
{block context}
<p><strong>{trans 'Number of files:'}</strong> {$downloads.nb_items}</p>
{assign $class = ''}{assign $i = 0}
{if !$label or $label.id != $dlabel.id}
<p class="smaller">{foreach $tags as $lab}
{aurl 'url', 'IDF_Views_Download::listLabel', array($project.shortname, $lab.id)}
{if $class != $lab.class}{if $i != 0}<br />{/if}<strong class="label">{$lab.class}:</strong> {/if}
<a href="{$url}" class="label">{$lab.name}</a>,{assign $i = $i + 1}{assign $class = $lab.class}{/foreach}</p>
{/if}
{assign $cloud = 'downloads'}
{include 'idf/tags-cloud.html'}
{if $deprecated > 0}
{aurl 'url', 'IDF_Views_Download::listLabel', array($project.shortname, $dlabel.id)}
<p class="helptext">{blocktrans}See <a href="{$url}">the deprecated files</a>.{/blocktrans}</p>

View File

@ -12,12 +12,6 @@
{aurl 'closed_url', 'IDF_Views_Issue::listStatus', array($project.shortname, 'closed')}
{blocktrans}<p><strong>Open issues:</strong> <a href="{$open_url}">{$open}</a></p>
<p><strong>Closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>{/blocktrans}
{assign $class = ''}{assign $i = 0}
<div id="issue-tags" class="smaller"><dl>{foreach $project.getTagCloud($cloud) as $label}
{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
{if $class != $label.class}<dt class="label">{$label.class}</dt>{assign $i = 0}{/if}
<dd><a href="{$url}" class="label">{$label.name},</a></dd>
{assign $class = $label.class}
{assign $i = $i + 1}
{/foreach}</dl></p>
{assign $cloud = 'issues'}
{include 'idf/tags-cloud.html'}
{/block}

View File

@ -0,0 +1,8 @@
{assign $class = ''}{assign $i = 0}
<div id="tagscloud" class="smaller"><dl>{foreach $project.getTagCloud($cloud) as $label}
{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
{if $class != $label.class}<dt class="label">{$label.class}</dt>{assign $i = 0}{/if}
<dd><a href="{$url}" class="label">{$label.name},</a></dd>
{assign $class = $label.class}
{assign $i = $i + 1}
{/foreach}</dl></p>

View File

@ -9,13 +9,8 @@
{/block}
{block context}
<p><strong>{trans 'Number of pages:'}</strong> {$pages.nb_items}</p>
{assign $class = ''}{assign $i = 0}
{if !$label or $label.id != $dlabel.id}
<p class="smaller">{foreach $tags as $lab}
{aurl 'url', 'IDF_Views_Wiki::listLabel', array($project.shortname, $lab.id)}
{if $class != $lab.class}{if $i != 0}<br />{/if}<strong class="label">{$lab.class}:</strong> {/if}
<a href="{$url}" class="label">{$lab.name}</a>,{assign $i = $i + 1}{assign $class = $lab.class}{/foreach}</p>
{/if}
{assign $cloud = 'wiki'}
{include 'idf/tags-cloud.html'}
{if $deprecated > 0}
{aurl 'url', 'IDF_Views_Wiki::listLabel', array($project.shortname, $dlabel.id)}
<p class="helptext">{blocktrans}See <a href="{$url}">the deprecated pages</a>.{/blocktrans}</p>

View File

@ -203,16 +203,16 @@ span.px-header-title a, span.px-header-title a:link, span.px-header-title a:visi
/**
* Issue
*/
#issue-tags dl {
#tagscloud dl {
margin: 0;
}
#issue-tags dt {
#tagscloud dt {
margin-top: .5em;
font-weight: bold;
}
#issue-tags dd {
#tagscloud dd {
margin: 0;
display: inline;
}