Indefero

Indefero Commit Details


Date:2011-10-04 03:05:42 (13 years 2 months ago)
Author:William MARTIN
Branch:develop, feature.diff-whitespace, feature.issue-of-others, feature.wiki-default-page, release-1.2, release-1.3
Commit:813184f06cf4589e019b68e74dec2180853e87c0
Parents: d860f299fdec7dfbcf7c602f8d7841c944ecb097
Message:Fix an issue with "unasigned issues" Rename the view to userIssues

Changes:

File differences

src/IDF/Views/Issue.php
109109
110110
111111
112
112113
113114
114115
116
115117
116
118
117119
118120
119121
......
313315
314316
315317
316
317
318
319
318320
319321
320322
......
372374
373375
374376
375
377
376378
377379
378380
......
387389
388390
389391
390
392
391393
392394
393395
foreach ($owners as $user => $nb) {
if ($user === '') {
$key = __('Not assigned');
$login = null;
} else {
$obj = Pluf::factory('Pluf_User')->getOne(array('filter'=>'id='.$user));
$key = $obj->first_name . ' ' . $obj->last_name;
$login = $obj->login;
}
$ownerStatistics[$key] = array($nb, (int)(100 * $nb / $opened), $obj->login);
$ownerStatistics[$key] = array($nb, (int)(100 * $nb / $opened), $login);
}
// Issue class tag statistics
*
* Only open issues are shown.
*/
public $myIssues_precond = array('IDF_Precondition::accessIssues');
public function myIssues($request, $match)
public $userIssues_precond = array('IDF_Precondition::accessIssues');
public function userIssues($request, $match)
{
$prj = $request->project;
'current_user' => $request->user);
$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->action = array('IDF_Views_Issue::userIssues', array($prj->shortname, $match[2]));
$pag->sort_order = array('modif_dtime', 'ASC'); // will be reverted
$pag->sort_reverse_order = array('modif_dtime');
$pag->sort_link_title = true;
$pag->items_per_page = 10;
$pag->no_results_text = __('No issues were found.');
$pag->setFromRequest($request);
return Pluf_Shortcuts_RenderToResponse('idf/issues/my-issues.html',
return Pluf_Shortcuts_RenderToResponse('idf/issues/userIssues.html',
array('project' => $prj,
'page_title' => $title,
'login' => $user->login,
src/IDF/conf/urls.php
156156
157157
158158
159
159
160160
161161
162162
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(.*)/(\w+)/$#',
'base' => $base,
'model' => 'IDF_Views_Issue',
'method' => 'myIssues');
'method' => 'userIssues');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/attachment/(\d+)/(.*)$#',
'base' => $base,
src/IDF/templates/idf/issues/base.html
44
55
66
7
7
88
99
1010
<div id="sub-tabs">
<a {if $inSummaryIssues}class="active" {/if}href="{url 'IDF_Views_Issue::summary', array($project.shortname)}">{trans 'Summary'}</a>
| <a {if $inOpenIssues}class="active" {/if}href="{url 'IDF_Views_Issue::index', array($project.shortname)}">{trans 'Open Issues'}</a>
{if !$user.isAnonymous()} | <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a> | <a {if $inMyIssues}class="active" {/if}href="{url 'IDF_Views_Issue::myIssues', array($project.shortname, $user.login, 'submit')}">{trans 'My Issues'}</a>
{if !$user.isAnonymous()} | <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a> | <a {if $inMyIssues}class="active" {/if}href="{url 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'submit')}">{trans 'My Issues'}</a>
| <a {if $inWatchList}class="active" {/if}href="{url 'IDF_Views_Issue::watchList', array($project.shortname, 'open')}">{trans 'My watch list'}</a>{/if} |
<form class="star" action="{url 'IDF_Views_Issue::search', array($project.shortname)}" method="get">
<input accesskey="4" type="text" value="{$q}" name="q" size="20" />
src/IDF/templates/idf/issues/my-issues.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{extends "idf/issues/base.html"}
{block docclass}yui-t2{if $user.login == $login}{assign $inMyIssues = true}{/if}{/block}
{block body}
{$issues.render}
{if !$user.isAnonymous()}
{aurl 'url', 'IDF_Views_Issue::create', array($project.shortname)}
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Issue'}</a></p>{/if}
{/block}
{block context}
{aurl 'owner_url', 'IDF_Views_Issue::myIssues', array($project.shortname, $login, 'owner')}
{aurl 'submit_url', 'IDF_Views_Issue::myIssues', array($project.shortname, $login, 'submit')}
{aurl 'owner_closed_url', 'IDF_Views_Issue::myIssues', array($project.shortname, $login, 'ownerclosed')}
{aurl 'submit_closed_url', 'IDF_Views_Issue::myIssues', array($project.shortname, $login, 'submitclosed')}
<p><strong>{trans 'Submitted issues:'}</strong> <a href="{$submit_url}">{$nb_submit}</a>
{if $nb_submit_closed}<br /><span class="helptext">{blocktrans $nb_submit_closed}See the <a href="{$submit_closed_url}">{$nb_submit_closed} closed</a>.{plural}See the <a href="{$submit_closed_url}">{$nb_submit_closed} closed</a>.{/blocktrans}</span>{/if}</p>
{if $nb_owner > 0}
<p><strong>{trans 'Working issues:'}</strong> <a href="{$owner_url}">{$nb_owner}</a>
{if $nb_owner_closed}<br /><span class="helptext">{blocktrans $nb_owner_closed}See the <a href="{$owner_closed_url}">{$nb_owner_closed} closed</a>.{plural}See the <a href="{$owner_closed_url}">{$nb_owner_closed} closed</a>.{/blocktrans}</span>{/if}</p>{/if}
{/block}
src/IDF/templates/idf/issues/summary.html
7171
7272
7373
74
74
75
76
77
78
79
7580
7681
7782
<tbody>
{foreach $ownerStatistics as $key => $value}
<tr>
<td class="name"><a href="{url 'IDF_Views_Issue::myIssues', array($project.shortname, $value[2], 'owner')}">{$key}</a></td>
<td class="name">
{if !empty($value[2])}
{aurl 'url', 'IDF_Views_Issue::userIssues', array($project.shortname, $value[2], 'owner')}
<a href="{$url}">{$key}</a>
{else}{$key}{/if}
</td>
<td class="count">{$value[0]}</td>
<td class="graph">
<table class='graph'>
src/IDF/templates/idf/issues/userIssues.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{extends "idf/issues/base.html"}
{block docclass}yui-t2{if $user.login == $login}{assign $inMyIssues = true}{/if}{/block}
{block body}
{$issues.render}
{if !$user.isAnonymous()}
{aurl 'url', 'IDF_Views_Issue::create', array($project.shortname)}
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'New Issue'}</a></p>{/if}
{/block}
{block context}
{aurl 'owner_url', 'IDF_Views_Issue::userIssues', array($project.shortname, $login, 'owner')}
{aurl 'submit_url', 'IDF_Views_Issue::userIssues', array($project.shortname, $login, 'submit')}
{aurl 'owner_closed_url', 'IDF_Views_Issue::userIssues', array($project.shortname, $login, 'ownerclosed')}
{aurl 'submit_closed_url', 'IDF_Views_Issue::userIssues', array($project.shortname, $login, 'submitclosed')}
<p><strong>{trans 'Submitted issues:'}</strong> <a href="{$submit_url}">{$nb_submit}</a>
{if $nb_submit_closed}<br /><span class="helptext">{blocktrans $nb_submit_closed}See the <a href="{$submit_closed_url}">{$nb_submit_closed} closed</a>.{plural}See the <a href="{$submit_closed_url}">{$nb_submit_closed} closed</a>.{/blocktrans}</span>{/if}</p>
{if $nb_owner > 0}
<p><strong>{trans 'Working issues:'}</strong> <a href="{$owner_url}">{$nb_owner}</a>
{if $nb_owner_closed}<br /><span class="helptext">{blocktrans $nb_owner_closed}See the <a href="{$owner_closed_url}">{$nb_owner_closed} closed</a>.{plural}See the <a href="{$owner_closed_url}">{$nb_owner_closed} closed</a>.{/blocktrans}</span>{/if}</p>{/if}
{/block}
src/IDF/templates/idf/js-hotkeys.html
1010
1111
1212
13
14
13
14
1515
1616
1717
{if $hasWikiAccess}{hotkey 'Shift+o', 'IDF_Views_Wiki::index', array($project.shortname)}{/if}
{if $hasSourceAccess}{hotkey 'Shift+s', 'IDF_Views_Source::treeBase', array($project.shortname, $project.getScmRoot())}{/if}
{if $hasIssuesAccess and !$user.isAnonymous()}
{hotkey 'Shift+m', 'IDF_Views_Issue::myIssues', array($project.shortname, $user.login, 'submit')}
{hotkey 'Shift+w', 'IDF_Views_Issue::myIssues', array($project.shortname, $user.login, 'owner')}
{hotkey 'Shift+m', 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'submit')}
{hotkey 'Shift+w', 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'owner')}
{/if}{/if} //-->
</script>
src/IDF/templates/idf/review/base-full.html
44
55
66
7
7
88
99
1010
<div id="sub-tabs">
<a {if $inOpenReviews}class="active" {/if}href="{url 'IDF_Views_Review::index', array($project.shortname)}">{trans 'Open Reviews'}</a> {*
{if !$user.isAnonymous()} | <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a> | <a {if $inMyIssues}class="active" {/if}href="{url 'IDF_Views_Issue::myIssues', array($project.shortname, $user.login, 'submit')}">{trans 'My Issues'}</a>{/if} |
{if !$user.isAnonymous()} | <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a> | <a {if $inMyIssues}class="active" {/if}href="{url 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'submit')}">{trans 'My Issues'}</a>{/if} |
<form class="star" action="{url 'IDF_Views_Issue::search', array($project.shortname)}" method="get">
<input accesskey="4" type="text" value="{$q}" name="q" size="20" />
<input type="submit" name="s" value="{trans 'Search'}" />

Archive Download the corresponding diff file

Page rendered in 0.09522s using 13 queries.