Fixed some inconsistencies in the interface (thanks Luigi).
This commit is contained in:
parent
6360ea93be
commit
bd0209a28e
@ -266,16 +266,20 @@ class IDF_Project extends Pluf_Model
|
||||
* project. For issues, only open issues are used to generate the
|
||||
* cloud.
|
||||
*
|
||||
* @param string ('issues') or 'downloads'
|
||||
* @param string ('issues') 'closed_issues' or 'downloads'
|
||||
* @return ArrayObject of IDF_Tag
|
||||
*/
|
||||
public function getTagCloud($what='issues')
|
||||
{
|
||||
$tag_t = Pluf::factory('IDF_Tag')->getSqlTable();
|
||||
if ($what == 'issues') {
|
||||
if ($what == 'issues' or $what == 'closed_issues') {
|
||||
$what_t = Pluf::factory('IDF_Issue')->getSqlTable();
|
||||
$asso_t = $this->_con->pfx.'idf_issue_idf_tag_assoc';
|
||||
if ($what == 'issues') {
|
||||
$ostatus = $this->getTagIdsByStatus('open');
|
||||
} else {
|
||||
$ostatus = $this->getTagIdsByStatus('closed');
|
||||
}
|
||||
if (count($ostatus) == 0) $ostatus[] = 0;
|
||||
$sql = sprintf('SELECT '.$tag_t.'.id AS id, COUNT(*) AS nb_use FROM '.$tag_t.' '."\n".
|
||||
'LEFT JOIN '.$asso_t.' ON idf_tag_id='.$tag_t.'.id '."\n".
|
||||
|
@ -38,7 +38,7 @@ class IDF_Views_Issue
|
||||
public function index($request, $match)
|
||||
{
|
||||
$prj = $request->project;
|
||||
$title = sprintf(__('%s Recent Issues'), (string) $prj);
|
||||
$title = sprintf(__('%s Open Issues'), (string) $prj);
|
||||
// Get stats about the issues
|
||||
$open = $prj->getIssueCountByStatus('open');
|
||||
$closed = $prj->getIssueCountByStatus('closed');
|
||||
@ -47,7 +47,7 @@ class IDF_Views_Issue
|
||||
$pag->class = 'recent-issues';
|
||||
$pag->item_extra_props = array('project_m' => $prj,
|
||||
'shortname' => $prj->shortname);
|
||||
$pag->summary = __('This table shows the open recent issues.');
|
||||
$pag->summary = __('This table shows the open issues.');
|
||||
$otags = $prj->getTagIdsByStatus('open');
|
||||
if (count($otags) == 0) $otags[] = 0;
|
||||
$pag->forced_where = new Pluf_SQL('project=%s AND status IN ('.implode(', ', $otags).')', array($prj->id));
|
||||
@ -69,6 +69,7 @@ class IDF_Views_Issue
|
||||
'open' => $open,
|
||||
'closed' => $closed,
|
||||
'issues' => $pag,
|
||||
'cloud' => 'issues',
|
||||
),
|
||||
$request);
|
||||
}
|
||||
@ -102,7 +103,7 @@ class IDF_Views_Issue
|
||||
$pag->class = 'recent-issues';
|
||||
$pag->item_extra_props = array('project_m' => $prj,
|
||||
'shortname' => $prj->shortname);
|
||||
$pag->summary = __('This table shows the open recent issues.');
|
||||
$pag->summary = __('This table shows the open issues.');
|
||||
$pag->forced_where = $f_sql;
|
||||
$pag->action = array('IDF_Views_Issue::myIssues', array($prj->shortname, $match[2]));
|
||||
$pag->sort_order = array('modif_dtime', 'DESC');
|
||||
@ -294,6 +295,7 @@ class IDF_Views_Issue
|
||||
'open' => $open,
|
||||
'closed' => $closed,
|
||||
'issues' => $pag,
|
||||
'cloud' => 'closed_issues',
|
||||
),
|
||||
$request);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@
|
||||
<li>{trans '<kbd>Shift+d</kbd>: Downloads.'}</li>
|
||||
<li>{trans '<kbd>Shift+s</kbd>: Source.'}</li>
|
||||
<li>{trans '<kbd>Shift+a</kbd>: Create a new issue.'}</li>
|
||||
<li>{trans '<kbd>Shift+i</kbd>: List of recently submitted issues.'}</li>
|
||||
<li>{trans '<kbd>Shift+i</kbd>: List of open issues.'}</li>
|
||||
<li>{trans '<kbd>Shift+m</kbd>: The issues you submitted.'}</li>
|
||||
<li>{trans '<kbd>Shift+w</kbd>: The issues assigned to you.'}</li>
|
||||
</ul>
|
||||
|
@ -2,7 +2,7 @@
|
||||
{block tabissues} class="active"{/block}
|
||||
{block subtabs}
|
||||
<div id="sub-tabs">
|
||||
<a href="{url 'IDF_Views_Issue::index', array($project.shortname)}">{trans 'Recent issues'}</a>
|
||||
<a href="{url 'IDF_Views_Issue::index', array($project.shortname)}">{trans 'Open issues'}</a>
|
||||
{if !$user.isAnonymous()} | <a href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a> | <a href="{url 'IDF_Views_Issue::myIssues', array($project.shortname, 'submit')}">{trans 'My Issues'}</a>{/if}
|
||||
{superblock}
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
{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}
|
||||
<p class="smaller">{foreach $project.getTagCloud() as $label}
|
||||
<p class="smaller">{foreach $project.getTagCloud($cloud) as $label}
|
||||
{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
|
||||
{if $class != $label.class}{if $i != 0}<br />{/if}<strong class="label">{$label.class}:</strong> {/if}
|
||||
<a href="{$url}" class="label">{$label.name}</a>,{assign $class = $label.class}{assign $i = $i + 1}{/foreach}</p>
|
||||
|
Loading…
Reference in New Issue
Block a user