Permalink
Browse files

working on issue and milestone views

  • Loading branch information...
1 parent 1146aaa commit bd939faca55b6e51617300085364fa24a6dfa842 Filippo committed Jul 3, 2010
Showing with 341 additions and 395 deletions.
  1. BIN data/phpcollab_unit_test.db
  2. +0 −3 nbproject/private/private.xml
  3. +0 −13 plugins/idProjectManagementPlugin/lib/form/doctrine/PluginIssueReferenceForm.class.php
  4. +0 −13 plugins/idProjectManagementPlugin/lib/form/doctrine/PluginIssueUserForm.class.php
  5. +0 −13 plugins/idProjectManagementPlugin/lib/form/doctrine/PluginProjectUserForm.class.php
  6. +0 −13 plugins/idProjectManagementPlugin/lib/form/doctrine/PluginProjectsTrackersForm.class.php
  7. +6 −0 plugins/idProjectManagementPlugin/lib/form/idIssueForm.class.php
  8. 0 plugins/idProjectManagementPlugin/lib/helper/{AutoLinkHelper.php → __blaz__AutoLinkHelper.php}
  9. +4 −4 plugins/idProjectManagementPlugin/lib/helper/idPaginationHelper.php
  10. +2 −2 plugins/idProjectManagementPlugin/modules/idDashboard/templates/_project_report.php
  11. +1 −1 plugins/idProjectManagementPlugin/modules/idDashboard/templates/indexSuccess.php
  12. +7 −7 plugins/idProjectManagementPlugin/modules/idIssue/actions/actions.class.php
  13. +0 −133 plugins/idProjectManagementPlugin/modules/idIssue/templates/_form.php
  14. +95 −8 plugins/idProjectManagementPlugin/modules/idIssue/templates/editSuccess.php
  15. +1 −1 plugins/idProjectManagementPlugin/modules/idIssue/templates/indexSuccess.php
  16. +0 −1 plugins/idProjectManagementPlugin/modules/idMilestone/actions/actions.class.php
  17. +60 −8 plugins/idProjectManagementPlugin/modules/idMilestone/templates/editSuccess.php
  18. +1 −1 plugins/idProjectManagementPlugin/modules/idMilestone/templates/indexSuccess.php
  19. +78 −46 plugins/idProjectManagementPlugin/modules/idMilestone/templates/showSuccess.php
  20. +0 −55 plugins/idProjectManagementPlugin/modules/idProject/templates/_filters.php
  21. +1 −0 plugins/idProjectManagementPlugin/modules/idProject/templates/_project_overview.php
  22. +0 −14 plugins/idProjectManagementPlugin/modules/idProject/templates/_recent_project_activities.php
  23. +3 −3 plugins/idProjectManagementPlugin/modules/idProject/templates/_sub_menu.php
  24. +1 −1 plugins/idProjectManagementPlugin/modules/idProject/templates/showSuccess.php
  25. +1 −1 test/functional/fe/idProjectEventLoggedTest.php
  26. +1 −1 test/functional/fe/idProjectIssueCreateTest.php
  27. +1 −1 test/functional/fe/idProjectMilestoneCreateTest.php
  28. +23 −26 test/functional/fe/idProjectMilestoneShowTest.php
  29. +2 −2 test/functional/fe/userDashboardShowTest.php
  30. +0 −24 test/unit/autolinkTest.php
  31. +53 −0 web/css/custom-prod.css
Binary file not shown.
@@ -6,7 +6,4 @@
<line>13</line>
</file>
</editor-bookmarks>
- <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
- <file>file:/var/www/giugno/plugins/idProjectManagementPlugin/modules/idMilestone/templates/indexSuccess.php</file>
- </open-files>
</project-private>
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * PluginIssueReference form.
- *
- * @package ##PROJECT_NAME##
- * @subpackage form
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: sfDoctrineFormPluginTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-abstract class PluginIssueReferenceForm extends BaseIssueReferenceForm
-{
-}
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * PluginIssueUser form.
- *
- * @package ##PROJECT_NAME##
- * @subpackage form
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: sfDoctrineFormPluginTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-abstract class PluginIssueUserForm extends BaseIssueUserForm
-{
-}
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * PluginProjectUser form.
- *
- * @package ##PROJECT_NAME##
- * @subpackage form
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: sfDoctrineFormPluginTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-abstract class PluginProjectUserForm extends BaseProjectUserForm
-{
-}
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * PluginProjectsTrackers form.
- *
- * @package ##PROJECT_NAME##
- * @subpackage form
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: sfDoctrineFormPluginTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-abstract class PluginProjectsTrackersForm extends BaseProjectsTrackersForm
-{
-}
@@ -143,11 +143,17 @@ public function configure()
$parameters = $this->isNew() ? array('default' => $today) : array();
$this->widgetSchema['starting_date'] = new sfWidgetFormDate($parameters);
+ $this->widgetSchema['title'] = new sfWidgetFormInputText();
+ $this->widgetSchema['tracker_id']->setOption('add_empty', false);
+ $this->widgetSchema['description']->setAttribute('rows', 4);
+ $this->widgetSchema['users_list']->setAttribute('size', 5);
+
$this->widgetSchema['ending_date'] = new sfWidgetFormDate();
$this->widgetSchema['project_id'] = new sfWidgetFormInputHidden();
$this->widgetSchema['users_list'] = new sfWidgetFormDoctrineChoiceMany(array('model' => 'Profile', 'query' => $this->getQueryForUsers()));
$this->widgetSchema['milestone_id'] = new sfWidgetFormDoctrineSelect(array('model' => 'Milestone', 'add_empty' => true, 'query' => $this->getQueryForMilestones()));
$this->widgetSchema['related_issue_list'] = new sfWidgetFormDoctrineChoiceMany(array('model' => 'Issue', 'query' => $this->getQueryForRelatedIssue()));
+ $this->widgetSchema['related_issue_list']->setAttribute('size', 5);
$this->validatorSchema['status_id'] = new sfValidatorDoctrineChoice(array('model' => 'Status', 'column' => 'id', 'required' => true));
@@ -33,8 +33,8 @@ function pager_navigation_log_time($pager, $uri)
// First and previous page
if ($pager->getPage() != 1)
{
- $navigation .= '<li>'.link_to('<img title="First" alt="First" src="images/pagination-left.png">',$uri.'1').'</li>';
- $navigation .= '<li>'.link_to('<img title="Previous" alt="Previous" src="images/pagination-left.png">',$uri.$pager->getPreviousPage()).'</li>';
+ $navigation .= '<li>'.link_to('First', $uri.'1').'</li>';
+ $navigation .= '<li>'.link_to('<img title="Previous" alt="Previous" src="/images/pagination-left.png">', $uri.$pager->getPreviousPage()).'</li>';
}
// Pages one by one
@@ -50,8 +50,8 @@ function pager_navigation_log_time($pager, $uri)
// Next and last page
if ($pager->getPage() != $pager->getLastPage())
{
- $navigation .= '<li>'.link_to('<img title="Next" alt="Next" src="images/pagination-left.png">',$uri.$pager->getNextPage()).'</li>';
- $navigation .= '<li>'.link_to('<img title="Last" alt="Last" src="images/pagination-left.png">',$uri.$pager->getLastPage()).'</li>';
+ $navigation .= '<li>'.link_to('<img title="Next" alt="Next" src="/images/pagination-right.png">', $uri.$pager->getNextPage()).'</li>';
+ $navigation .= '<li>'.link_to('Last', $uri.$pager->getLastPage()).'</li>';
}
}
@@ -10,8 +10,8 @@
</div>
<div class="padding">
<ul>
- <li class="span-half"><?php echo link_to($project_report['remaining_issues'], '@index_issue?project_id='.$project_id); ?> <small>Tickets Remain</small></li>
- <li class="span-half"><?php echo link_to($project_report['closed_issues'], '@index_issue?project_id='.$project_id); ?> <small>Tickets Closed</small></li>
+ <li class="span-half"><?php echo link_to($project_report['remaining_issues'], '@index_issue?project_id='.$project_id); ?> <small>Issues Remain</small></li>
+ <li class="span-half"><?php echo link_to($project_report['closed_issues'], '@index_issue?project_id='.$project_id); ?> <small>Issues Closed</small></li>
<li class="span-half"><?php echo link_to($project_report['messages'], '@index_messages?project_id='.$project_id); ?> <small>Discussions</small></li>
<?php if (isset($project_report['commits'])): ?>
<li class="span-half"><a href="#">999</a> <small>Commits</small></li>
@@ -6,7 +6,7 @@
<?php include_partial('idDashboard/last_events', array('recent_activities' => $recent_activities ))?>
<div class="span-full">
- <div class="title"><span>Tickets</span></div>
+ <div class="title"><span>Issues</span></div>
<div class="menu">
<div class="span-3">Name</div>
<div class="span-15">Description</div>
@@ -79,7 +79,7 @@ public function executeNew(sfWebRequest $request)
{
$this->forwardUnless($this->getUser()->hasCredential('idIssue-Create'), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
- $this->forward404Unless(!is_null(Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
+ $this->forward404Unless(!is_null($this->project = Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
$this->form = new idIssueForm($request->getParameter('project_id'));
$this->form->setDefault('project_id', $request->getParameter('project_id'));
@@ -96,7 +96,7 @@ public function executeCreate(sfWebRequest $request)
$this->forwardUnless($this->getUser()->hasCredential('idIssue-Create'), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$this->forward404Unless($request->isMethod('post'));
- $this->forward404Unless(!is_null(Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
+ $this->forward404Unless(!is_null($this->project = Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
$this->form = new idIssueForm($request->getParameter('project_id'));
@@ -114,7 +114,7 @@ public function executeEdit(sfWebRequest $request)
{
$this->forwardUnless($this->getUser()->hasCredential('idIssue-Edit'), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
- $this->forward404Unless(!is_null(Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
+ $this->forward404Unless(!is_null($this->project = Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
$this->forward404Unless($issue = Doctrine::getTable('Issue')->find(array($request->getParameter('issue_id'))), sprintf('Object issue does not exist (%s).', array($request->getParameter('issue_id'))));
$this->forward404Unless($issue->project_id == $request->getParameter('project_id'));
@@ -132,7 +132,7 @@ public function executeUpdate(sfWebRequest $request)
$this->forwardUnless($this->getUser()->hasCredential('idIssue-Edit'), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
$this->forward404Unless($request->isMethod('post') || $request->isMethod('put'));
- $this->forward404Unless(!is_null(Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
+ $this->forward404Unless(!is_null($this->project = Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
$this->forward404Unless($issue = Doctrine::getTable('Issue')->find(array($request->getParameter('issue_id'))), sprintf('Object issue does not exist (%s).', array($request->getParameter('issue_id'))));
$this->form = new idIssueForm($request->getParameter('project_id'), $issue);
@@ -151,7 +151,7 @@ public function executeDelete(sfWebRequest $request)
{
$this->forwardUnless($this->getUser()->hasCredential('idIssue-Delete'), sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
- $this->forward404Unless(!is_null(Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
+ $this->forward404Unless(!is_null($this->project = Doctrine::getTable('Project')->find(array($request->getParameter('project_id')))));
$this->forward404Unless($issue = Doctrine::getTable('Issue')->find(array($request->getParameter('issue_id'))), sprintf('Object issue does not exist (%s).', array($request->getParameter('issue_id'))));
$request->checkCSRFProtection();
@@ -184,7 +184,7 @@ public function executeSetEstimatedTime(sfWebRequest $request)
$this->redirect('@show_issue?project_id='.$issue->project_id.'&issue_id='.$issue->id);
}
- protected function issueIsBeingCloding($parameters)
+ protected function issueIsBeingClosing($parameters)
{
return (empty($parameters['ending_date']['month']) &&
empty($parameters['ending_date']['day']) &&
@@ -209,7 +209,7 @@ protected function fixParameterForOpenOrClosedIssue($parameters, $issue)
if (is_array($parameters))
{
- if ($this->issueIsBeingCloding($parameters))
+ if ($this->issueIsBeingClosing($parameters))
{
list($parameters['ending_date']['year'], $parameters['ending_date']['month'], $parameters['ending_date']['day']) = explode('-',date('Y-m-d', time()));
}
@@ -1,133 +0,0 @@
-<form action="<?php echo url_for(($form->getObject()->isNew() ? '@create_issue' : '@update_issue').($form->getObject()->isNew() ? '?project_id='.$project_id : '?project_id='.$project_id.'&issue_id='.$form->getObject()->getid())) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?> class="form">
-
-<?php if (!$form->getObject()->isNew()): ?>
-<input type="hidden" name="sf_method" value="put" />
-<?php endif; ?>
- <?php if ($form->hasGlobalErrors()): ?>
- <div class="group">
- <div class="fieldWithErrors">
- <span class="error"><?php echo $form->renderGlobalErrors() ?></span>
- </div>
- </div>
- <?php endif; ?>
-
- <table class="table">
-
- <tr>
- <th class="first"></th>
- <th><?php echo __('Fields') ?></th>
- <th><?php echo __('Values') ?></th>
- <th class="last"></th>
- </tr>
-
- <tr class="even">
- <td>&nbsp;</td>
- <td><?php echo $form['title']->renderLabel() ?></td>
- <td>
- <?php echo $form['title']->renderError() ?>
- <?php echo $form['title'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="odd">
- <td>&nbsp;</td>
- <td><?php echo $form['description']->renderLabel() ?></td>
- <td>
- <?php echo $form['description']->renderError() ?>
- <?php echo $form['description'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="even">
- <td>&nbsp;</td>
- <td><?php echo $form['tracker_id']->renderLabel() ?></td>
- <td>
- <?php echo $form['tracker_id']->renderError() ?>
- <?php echo $form['tracker_id'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="odd">
- <td>&nbsp;</td>
- <td><?php echo $form['status_id']->renderLabel('Status') ?></td>
- <td>
- <?php echo $form['status_id']->renderError() ?>
- <?php echo $form['status_id'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="even">
- <td>&nbsp;</td>
- <td><?php echo $form['priority_id']->renderLabel('Priority') ?></td>
- <td>
- <?php echo $form['priority_id']->renderError() ?>
- <?php echo $form['priority_id'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="odd">
- <td>&nbsp;</td>
- <td><?php echo $form['starting_date']->renderLabel() ?></td>
- <td>
- <?php echo $form['starting_date']->renderError() ?>
- <?php echo $form['starting_date'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="even">
- <td>&nbsp;</td>
- <td><?php echo $form['ending_date']->renderLabel() ?></td>
- <td>
- <?php echo $form['ending_date']->renderError() ?>
- <?php echo $form['ending_date'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="odd">
- <td>&nbsp;</td>
- <td><?php echo $form['users_list']->renderLabel('Assign to') ?></td>
- <td>
- <?php echo $form['users_list']->renderError() ?>
- <?php echo $form['users_list'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="odd">
- <td>&nbsp;</td>
- <td><?php echo $form['milestone_id']->renderLabel('Milestone') ?></td>
- <td>
- <?php echo $form['milestone_id']->renderError() ?>
- <?php echo $form['milestone_id'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="even">
- <td>&nbsp;</td>
- <td><?php echo $form['issues_list']->renderLabel('Related issues') ?></td>
- <td>
- <?php echo $form['issues_list']->renderError() ?>
- <?php echo $form['issues_list'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr class="odd">
- <td>&nbsp;</td>
- <td><?php echo $form['estimated_time']->renderLabel('Estimated time') ?></td>
- <td>
- <?php echo $form['estimated_time']->renderError() ?>
- <?php echo $form['estimated_time'] ?>
- </td>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="2">
- <?php echo $form->renderHiddenFields() ?>
- &nbsp;<a href="<?php echo url_for('@index_issue?project_id='.$project_id) ?>"><?php echo __('Cancel'); ?></a>
- <?php if (!$form->getObject()->isNew()): ?>
- &nbsp;<?php echo link_to(__('Delete'), '@delete_issue?project_id='.$project_id.'&issue_id='.$form->getObject()->getid(), array('method' => 'delete', 'confirm' => __('Do you really want to delete this issue?'))) ?>
- <?php endif; ?>
- <input type="submit" value="<?php echo __('Save') ?>" />
- </td>
- </tr>
- </table>
-</form>
Oops, something went wrong. Retry.

0 comments on commit bd939fa

Please sign in to comment.