public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     global $auth;
     $this->id = 'bookmarks';
     $this->title = __('Your bookmarks');
     $this->no_items_html = __("You have no bookmarks");
     $this->show_icons = true;
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockCol_ItemType());
     $this->add_col(new ListBlockCol_ItemMonitored());
     #$this->add_col(new ListBlockCol_ItemStatus());
     #$this->add_col(new ListBlockCol_ItemState());
     #$this->add_col(new ListBlockCol_ItemProjectName());
     $this->add_col(new ListBlockCol_ItemName());
     $this->add_col(new ListBlockCol_ItemComment());
     $this->add_col(new ListBlockCol_ItemRemind());
     #$this->add_col(new ListBlockCol_ItemModifier());
     $this->add_col(new ListBlockCol_ItemModified());
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemBookmarkEdit')->id, 'name' => __('Edit bookmark'), 'id' => 'itemBookmarkEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsRemoveBookmark')->id, 'name' => __('Remove bookmark'), 'id' => 'itemsRemoveBookmark', 'context_menu' => 'submit')));
     ### block style functions ###
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'list', 'name' => __('List', 'List sort mode'), 'params' => array('style' => 'list', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id), 'default' => true)));
     $this->groupings = new BlockFunction_grouping(array('target' => 'changeBlockStyle', 'key' => 'grouped', 'name' => __('Grouped', 'List sort mode'), 'params' => array('style' => 'grouped', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id)));
     $this->add_blockFunction($this->groupings);
     ### list groupings ###
     $this->groupings->groupings = array(new ListGroupingType());
 }
Example #2
0
 public function __construct($args = NULL)
 {
     global $PH;
     parent::__construct();
     $this->id = 'comments';
     $this->no_items_html = $PH->getLink('commentNew');
     $this->title = __("Comments");
     #--- columns ----
     $this->add_col(new ListBlockCol_CommentPoster());
     $this->add_col(new ListBlockCol_CommentText());
     ### functions
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
     /**
     * NOTE the following functions only work if quick-edit
     * form is shown (so not for folders). I am not sure, if
     * we need this function.
     *
     
     $this->add_function(new ListFunction(array(
         'target'=>$PH->getPage('taskCollapseAllComments')->id,
         'name'  =>__('Shrink All Comments'),
         'id'    =>'commentsCollapseView',
         'label' => __('Collapse All Comments'),
         'context_menu'=>'submit',
     )));
     $this->add_function(new ListFunction(array(
         'target'=>$PH->getPage('taskExpandAllComments')->id,
         'name'  =>__('Expand All Comments'),
         'id'    =>'commentsExpandViesw',
         'label' => __('Expand All Comments'),
         'context_menu'=>'submit',
     )));
     */
 }
Example #3
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     $this->id = 'efforts';
     $this->no_items_html = __('no efforts booked yet');
     $this->title = __("Efforts");
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockColMethod(array('key' => 'p.name', 'name' => __('Project'), 'func' => 'getProjectLink')));
     $this->add_col(new ListBlockColMethod(array('key' => 'person', 'name' => __('person'), 'func' => 'getPersonLink')));
     $this->add_col(new ListBlockCol_EffortTask());
     $this->add_col(new ListBlockCol_EffortStatus());
     $this->add_col(new ListBlockCol_EffortBilling());
     $this->add_col(new ListBlockCol_EffortName());
     $this->add_col(new ListBlockCol_EffortDate());
     $this->add_col(new ListBlockCol_EffortDateEnd());
     $this->add_col(new ListBlockCol_EffortAmount());
     $this->add_col(new ListBlockCol_DayGraph());
     #---- functions ----
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortEdit')->id, 'name' => __('Edit effort'), 'id' => 'effortEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortNew')->id, 'name' => __('New effort'), 'id' => 'effortNew', 'icon' => 'new', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortsDelete')->id, 'name' => __('Delete'), 'id' => 'effortsDelete', 'icon' => 'delete', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortViewMultiple')->id, 'name' => __('View selected Efforts'), 'id' => 'effortViewMultiple', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortShowAsCSV')->id, 'name' => __('Show as CSV'), 'id' => 'effortShowAsCSV', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
     ### block style functions ###
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'list', 'default' => true, 'name' => __('List', 'List sort mode'), 'params' => array('style' => 'list', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id))));
     $this->groupings = new BlockFunction_grouping(array('target' => 'changeBlockStyle', 'key' => 'grouped', 'name' => __('Grouped', 'List sort mode'), 'params' => array('style' => 'grouped', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id)));
     $this->add_blockFunction($this->groupings);
     ### list groupings ###
     $this->groupings->groupings = array(new ListGroupingEffortStatus(), new ListGroupingCreatedBy(), new ListGroupingTask(), new ListGroupingProject());
 }
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     $this->id = 'effortstask';
     $this->no_items_html = __('no efforts booked yet');
     $this->title = __("Efforts on task");
     $this->show_icons = true;
     $this->add_col(new ListBlockCol_EffortTaskName());
     $this->add_col(new ListBlockCol_EffortTaskAmount());
     $this->add_col(new ListBlockCol_EffortTaskGraph());
 }
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     $this->id = 'effortsperson';
     $this->no_items_html = __('no efforts booked yet');
     $this->title = __("Efforts on team member");
     $this->show_icons = true;
     $this->add_col(new ListBlockColMethod(array('key' => 'person', 'name' => __('person'), 'func' => 'getPersonLink')));
     $this->add_col(new ListBlockCol_EffortPersonRole());
     $this->add_col(new ListBlockCol_EffortPersonAmount());
     $this->add_col(new ListBlockCol_EffortGraph());
 }
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     global $auth;
     $this->id = 'forwarded_tasks';
     $this->title = __('Your demand notes');
     $this->no_items_html = __('You have no demand notes');
     $this->show_icons = true;
     $this->add_col(new ListBlockCol_ForwardedTaskStatus());
     $this->add_col(new ListBlockCol_ForwardedTaskName());
     $this->add_col(new ListBlockCol_ForwardedTaskComment());
     $this->add_col(new ListBlockCol_ForwardedTaskModified());
 }
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     $this->id = 'effortsprojectcalc';
     $this->no_items_html = __('no efforts booked yet');
     $this->title = __("Calculation for project");
     $this->show_icons = true;
     $this->add_col(new ListBlockCol_EffortProjectName());
     $this->add_col(new ListBlockCol_EffortProjectAmountHour());
     $this->add_col(new ListBlockCol_EffortProjectAmountSalary());
     $this->add_col(new ListBlockCol_EffortProjectCalculation());
     $this->add_col(new ListBlockCol_EffortProjectCalcGraph());
 }
Example #8
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     $this->id = 'projects';
     $this->title = "related Projects";
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockColPrio(array('key' => 'prio', 'name' => "P", 'tooltip' => __("Project priority (the icons have tooltips, too)"), 'sort' => 1)));
     $this->add_col(new ListBlockColStatus(array('key' => 'status', 'name' => "S", 'tooltip' => __("Task-Status"), 'sort' => 0)));
     $this->add_col(new ListBlockColMethod(array('id' => 'company', 'key' => 'c.name', 'name' => __("Company"), 'tooltip' => __("Company"), 'func' => 'getCompanyLink')));
     /*$this->add_col( new ListBlockColFormat(array(
           'key'=>'short',
           'name'=>"Name Short",
           'tooltip'=>"Shortnames used in other lists",
           'sort'=>0,
           'format'=>'<nobr><a href="index.php?go=projView&amp;prj={?id}">{?short}</a></nobr>'
       )));*/
     $this->add_col(new ListBlockCol_ProjectName());
     /*$this->add_col( new ListBlockColFormat(array(
           'key'=>'name',
           'name'=>__("Project"),
           'tooltip'=>__("Task name. More Details as tooltips"),
           'width'=>'30%',
           'sort'=>0,
           'format'=>'<a href="index.php?go=projView&amp;prj={?id}">{?name}</a>'
       )));
       */
     $this->add_col(new ListBlockColFormat(array('key' => 'status_summary', 'name' => __("Status Summary"), 'tooltip' => __("Short discription of the current status"), 'format' => '{?status_summary}')));
     $this->add_col(new ListBlockCol_ProjectPeople());
     $this->add_col(new ListBlockCol_ProjectEffortSum());
     $this->add_col(new ListBlockColMethod(array('name' => __("Tasks"), 'tooltip' => __("Number of open Tasks"), 'sort' => 0, 'func' => 'getNumTasks', 'style' => 'right', 'id' => 'tasks')));
     $this->add_col(new ListBlockColDate(array('key' => 'date_start', 'name' => __("Opened"), 'tooltip' => __("Day the Project opened"), 'sort' => 0)));
     $this->add_col(new ListBlockColDate(array('key' => 'date_closed', 'name' => __("Closed"), 'tooltip' => __("Day the Project state changed to closed"), 'sort' => 0)));
     #---- functions ------------------------
     global $PH;
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projEdit')->id, 'name' => __('Edit project'), 'id' => 'projEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projDelete')->id, 'name' => __('Delete project'), 'id' => 'projDelete', 'icon' => 'delete')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortNew')->id, 'name' => __('Log hours for a project'), 'id' => 'effortNew', 'context_menu' => 'submit', 'icon' => 'loghours')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projChangeStatus')->id, 'name' => __('Open / Close'), 'id' => 'projOpenClose', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projNew')->id, 'name' => __('Create new project'), 'id' => 'projNew', 'icon' => 'new', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projCreateTemplate')->id, 'name' => __('Create Template'), 'id' => 'projCreateTemplate', 'dropdown_menu' => true, 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projNewFromTemplate')->id, 'name' => __('Project from Template'), 'id' => 'projNewFromTemplate', 'dropdown_menu' => true)));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
     ### block style functions ###
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'list', 'name' => __('List', 'List sort mode'), 'params' => array('style' => 'list', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id), 'default' => true)));
     $this->groupings = new BlockFunction_grouping(array('target' => 'changeBlockStyle', 'key' => 'grouped', 'name' => __('Grouped', 'List sort mode'), 'params' => array('style' => 'grouped', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id)));
     $this->add_blockFunction($this->groupings);
     ### list groupings ###
     $this->groupings->groupings = array(new ListGroupingStatus(), new ListGroupingPrio(), new ListGroupingCompany());
 }
 /**
  *  constructor
  */
 public function __construct(Project $project)
 {
     parent::__construct();
     $this->title = __('Folders');
     if (!$project) {
         trigger_error("ListBlock_taskfolders() needs project-object as argument", E_USER_WARNING);
     }
     $this->task_folders = $project->getFolders();
     #--- render nothing if no folders ---
     if (!count($this->task_folders)) {
         $this->hidden = true;
     }
     #--- in taskView highlight current task ---
     global $PH;
     if ($PH->cur_page_id == 'taskView') {
         $task_id = get('tsk');
         $cur_task = Task::getById($task_id);
         if (!$cur_task) {
             $PH->abortWarning("invalid task-id");
             #@@@ not good inside lists / render Exception might be more appropriate
             return;
         }
         #--- use parent, if not a folder for itself ------
         if (!$cur_task->category == TCATEGORY_FOLDER) {
             $cur_task = Task::getById($cur_task->parent_task);
         }
         if ($cur_task && is_object($cur_task)) {
             $this->cur_task_id = $cur_task->id;
         }
     }
     #--- create task for project-root---
     $task_none = new Task(array('name' => "..none::"));
     $task_none->id = 0;
     $task_none->project = $project->id;
     array_unshift($this->task_folders, $task_none);
     #--- add columns --------------------------------------------------------
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockCol_TaskName(array('use_short_names' => true, 'indention' => true, 'use_collapsed' => true, 'show_toggles' => false)));
     $this->add_col(new ListBlockColMethod(array('name' => __("Tasks"), 'tooltip' => __("Number of subtasks"), 'sort' => 0, 'func' => 'getNumSubtasks', 'style' => 'right')));
     #$this->add_col( new ListBlockCol_TaskSumEfforts());
     #--- functions ----------------------------------------
     ### functions ###
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskEdit')->id, 'name' => __('Edit'), 'id' => 'taskEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskNewFolder')->id, 'name' => __('New'), 'id' => 'taskNewFolder', 'icon' => 'new', 'tooltip' => __('Create new folder under selected task'))));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksMoveToFolder')->id, 'name' => __('Move selected to folder'), 'id' => 'tasksMoveToFolder', 'context_menu' => 'submit', 'dropdown_menu' => 0)));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortNew')->id, 'name' => __('Log hours for select tasks'), 'id' => 'effortNew', 'icon' => 'loghours', 'context_menu' => 'submit')));
 }
Example #10
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     $this->id = 'companies';
     $this->title = __("related companies");
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockColFormat(array('key' => 'short', 'name' => __("Name Short"), 'tooltip' => __("Shortnames used in other lists"), 'sort' => 0, 'format' => '<nobr><a href="index.php?go=companyView&amp;company={?id}">{?short}</a></nobr>')));
     $this->add_col(new ListBlockCol_CompanyName());
     $this->add_col(new ListBlockColFormat(array('key' => 'phone', 'name' => __("Phone"), 'tooltip' => __("Phone-Number"), 'format' => '<nobr>{?phone}</nobr>')));
     $this->add_col(new ListBlockColLinkExtern(array('key' => 'homepage', 'name' => "Homepage")));
     $this->add_col(new ListBlockColMethod(array('name' => __("Proj"), 'tooltip' => __("Number of open Projects"), 'func' => 'getNumOpenProjects', 'style' => 'right')));
     $this->add_col(new ListBlockColMethod(array('name' => __("People"), 'id' => "people", 'tooltip' => __("People working for this person"), 'sort' => 0, 'style' => 'nowrap', 'func' => 'getPersonLinks')));
     /*$this->add_col( new ListBlockCol_ProjectEffortSum);
     
         	$this->add_col( new ListBlockColMethod(array(
         		'name'=>"Tasks",
         		'tooltip'=>"Number of open Tasks",
         		'sort'=>0,
         		'func'=>'getNumTasks',
                 'style'=>'right'
         	)));
        		$this->add_col( new ListBlockColDate(array(
     			'key'=>'date_start',
     			'name'=>"Opened",
     			'tooltip'=>"Day the Project opened",
     			'sort'=>0,
     		)));
        		$this->add_col( new ListBlockColDate(array(
     			'key'=>'date_closed',
     			'name'=>"Closed",
     			'tooltip'=>"Day the Project state changed to closed",
     			'sort'=>0,
     		)));
             */
     #---- functions ----
     global $PH;
     $this->add_function(new ListFunction(array('target' => $PH->getPage('companyEdit')->id, 'name' => __('Edit company'), 'id' => 'companyEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('companyDelete')->id, 'name' => __('Delete company'), 'id' => 'companyDelete', 'icon' => 'delete')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('companyNew')->id, 'name' => __('Create new company'), 'id' => 'companyNew', 'icon' => 'new', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
 }
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     $this->id = 'tasks';
     $this->class = 'milestones';
     $this->no_items_html = NULL;
     $this->title = __("Milestones");
     ### columns ###
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockCol_MilestoneName(array('use_short_names' => false, 'indention' => true)));
     $this->add_col(new listBlockCol_MilestoneDate());
     $this->add_col(new ListBlockCol_MilestoneTasksGraph());
     $this->add_col(new ListBlockCol_TaskAssignedTo(array('use_short_names' => false)));
     $this->add_col(new ListBlockColPubLevel());
     ### functions ###
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskEdit')->id, 'name' => __('Edit'), 'id' => 'taskEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     ### functions ###
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksDelete')->id, 'name' => __('Delete'), 'id' => 'taskDelete', 'icon' => 'delete', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
 }
Example #12
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     $this->id = 'tasks';
     $this->title = "Versions";
     $this->active_block_function = 'list';
     $this->add_col(new ListBlockColSelect());
     #$this->add_col( new ListBlockColPrio());
     #$this->add_col( new ListBlockColStatus());
     $this->add_col(new ListBlockCol_VersionName());
     $this->add_col(new ListBlockCol_TimeReleased());
     /*$this->add_col( new ListBlockColFormat(array(
           'key'=>'short',
           'name'=>"Name Short",
           'tooltip'=>"Shortnames used in other lists",
           'sort'=>0,
           'format'=>'<nobr><a href="index.php?go=projView&amp;prj={?id}">{?short}</a></nobr>'
       )));*/
     /*$this->add_col( new ListBlockColFormat(array(
           'key'=>'name',
           'name'=>__("Version"),
           'tooltip'=>__("Task name. More Details as tooltips"),
           'width'=>'30%',
           'sort'=>0,
           'format'=>'<a href="index.php?go=projView&amp;prj={?id}">{?name}</a>'
       )));*/
     #---- functions ------------------------
     global $PH;
     ### functions ###
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskEdit')->id, 'name' => __('Edit'), 'id' => 'taskEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
     $this->query_options['category'] = TCATEGORY_VERSION;
     #$this->query_options['is_released_min']= RELEASED_UPCOMMING;
     $this->query_options['status_min'] = 0;
     $this->query_options['status_max'] = 200;
     $this->query_options['order_by'] = 'created DESC';
 }
Example #13
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     $this->id = 'files';
     $this->title = "Files";
     $this->query_options['order_by'] = "created";
     $this->query_options['latest_only'] = true;
     ### columns ###
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockCol_FileThumbnail());
     $this->add_col(new ListBlockCol_FileName());
     $this->add_col(new ListBlockColFormat(array('key' => 'version', 'name' => __("Version"), 'sort' => 0, 'format' => '{?version}')));
     $this->add_col(new ListBlockCol_CreatedBy());
     $this->add_col(new ListBlockColDate());
     $this->add_col(new ListBlockCol_FileSummary());
     ### functions ###
     $this->add_function(new ListFunction(array('target' => $PH->getPage('fileEdit')->id, 'name' => __('Edit file'), 'id' => 'fileEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('filesDelete')->id, 'name' => __('Delete'), 'id' => 'filesDelete', 'icon' => 'delete', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('filesMoveToFolder')->id, 'name' => __('Move files'), 'id' => 'filesMoveToFolder', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
     /*
     $this->add_function(new ListFunction(array(
         'target'=>$PH->getPage('fileNew')->id,
         'name'  =>__('New file'),
         'id'    =>'fileNew',
         'icon'  =>'new',
         'context_menu'=>'submit',
     )));
     */
     ### block style functions ###
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'list', 'name' => __('List', 'List sort mode'), 'params' => array('style' => 'list', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id), 'default' => true)));
     $this->groupings = new BlockFunction_grouping(array('target' => 'changeBlockStyle', 'key' => 'grouped', 'name' => __('Grouped', 'List sort mode'), 'params' => array('style' => 'grouped', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id)));
     $this->add_blockFunction($this->groupings);
     ### list groupings ###
     $this->groupings->groupings = array(new ListGroupingStatus(), new ListGroupingMimetype(), new ListGroupingCreatedBy(), new ListGroupingParentItem());
 }
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     $this->id = 'projectpeople';
     $this->title = __("Your related people");
     $this->add_col(new ListBlockColSelect());
     /*$this->add_col( new ListBlockColFormat(array(
     			'key'=>'nickname',
     			'name'=>"Name Short",
     			'tooltip'=>"Shortnames used in other lists",
     			'sort'=>0,
     			'format'=>'<nobr><a href="index.php?go=personView&amp;person={?id}">{?nickname}</a></nobr>'
     		)));*/
     $this->add_col(new ListBlockCol_ProjectPersonName());
     $this->add_col(new ListBlockCol_ProjectJob());
     $this->add_col(new ListBlockCol_ProjectPersonLastLogin());
     #$this->add_col( new ListBlockColFormat(array(
     #	'key'=>'role',
     #	'name'=>__("Rights"),
     #	'tooltip'=>__("People rights in this project"),
     #	'format'=>'{?role}'
     #)));
     /*
     $this->add_col( new ListBlockColFormat(array(
     			'key'=>'phone_personal',
     			'name'=>"Private",
     			'format'=>'<nobr>{?phone_personal}</nobr>'
     		)));
        		$this->add_col( new ListBlockColFormat(array(
     			'key'=>'mobile',
     			'name'=>"Mobil",
     			'format'=>'<nobr>{?phone_mobile}</nobr>'
     		)));
        		$this->add_col( new ListBlockColFormat(array(
     			'key'=>'office',
     			'name'=>"Office",
     			'format'=>'<nobr>{?phone_office}</nobr>'
     		)));
        		$this->add_col( new ListBlockColFormat(array(
     			'key'=>'tagline',
     			'name'=>"Tagline",
     			'format'=>'{?tagline}'
     		)));
         	$this->add_col( new ListBlockColMethod(array(
         		'name'=>"Companies",
         		'sort'=>0,
         		'func'=>'getCompanyLinks',
         	)));
     
     /*$this->add_col( new ListBlockCol_ProjectEffortSum);
     
         	$this->add_col( new ListBlockColMethod(array(
         		'name'=>"Tasks",
         		'tooltip'=>"Number of open Tasks",
         		'sort'=>0,
         		'func'=>'getNumTasks',
         'style'=>'right'
         	)));
        		$this->add_col( new ListBlockColDate(array(
     			'key'=>'date_start',
     			'name'=>"Opened",
     			'tooltip'=>"Day the Project opened",
     			'sort'=>0,
     		)));
        		$this->add_col( new ListBlockColDate(array(
     			'key'=>'date_closed',
     			'name'=>"Closed",
     			'tooltip'=>"Day the Project state changed to closed",
     			'sort'=>0,
     		)));
     */
     #---- functions ----
     global $PH;
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projectPersonEdit')->id, 'name' => __('Edit team member'), 'id' => 'projectPersonEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projAddPerson')->id, 'name' => __('Add team member'), 'id' => 'projectPersonAdd', 'icon' => 'add', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('projectPersonDelete')->id, 'name' => __('Remove person from team'), 'id' => 'projectPersonDelete', 'icon' => 'sub', 'context_menu' => 'submit')));
     /*$this->add_function(new ListFunction(array(
           'target'=>$PH->getPage('personDelete')->id,
           'name'  =>'Delete person',
           'id'    =>'personDelete',
           'icon'  =>'delete'
       )));
       $this->add_function(new ListFunction(array(
           'target'=>$PH->getPage('personNew')->id,
           'name'  =>'Create new person',
           'id'    =>'personNew',
           'icon'  =>'new',
           'context_menu'=>'submit',
       )));
       */
 }
Example #15
0
 public function __construct($args = NULL)
 {
     global $PH;
     parent::__construct(array());
     $this->id = 'tasks';
     $this->no_items_html = NULL;
     $this->title = __("Tasks");
     ### filter params ###
     if ($args) {
         foreach ($args as $key => $value) {
             if (!isset($this->{$key}) && !is_null($this->{$key}) && !$this->{$key} === "") {
                 trigger_error("unknown parameter", E_USER_NOTICE);
             } else {
                 $this->{$key} = $value;
             }
         }
     }
     /**
      * @@@ dummy-settings for filters
      */
     #$this->filters=array(
     #    new ListFilter_status_min(),
     #    new ListFilter_status_max(),
     #    new ListFilter_not_older(array(
     #        'not_older' => 13*25*60*60,
     #    )),
     #);
     ### columns ###
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockColPrio(array('key' => 'prio', 'name' => "P", 'tooltip' => __("Priority of task"), 'sort' => 1)));
     $this->add_col(new ListBlockColMethod(array('key' => 'project', 'name' => __('Project'), 'func' => 'getProjectLink')));
     $this->add_col(new ListBlockColStatus(array('key' => 'status', 'name' => __("Status", "Columnheader"), 'tooltip' => __("Task-Status"), 'sort' => 0)));
     $this->add_col(new ListBlockCol_TaskLabel());
     $this->add_col(new ListBlockColMethod(array('key' => 'parent_task', 'name' => __('Folder'), 'func' => 'getFolderLinks')));
     $this->add_col(new ListBlockCol_TasknameWithFolder());
     $this->add_col(new ListBlockCol_TaskName(array('use_short_names' => $this->use_short_names, 'indention' => true)));
     $this->add_col(new ListBlockCol_TaskAssignedTo(array('use_short_names' => false)));
     $this->add_col(new listBlockColDate(array('key' => 'modified', 'name' => __('Modified', 'Column header'))));
     $this->add_col(new listBlockColDate(array('key' => 'date_closed', 'name' => __('Closed'))));
     #$this->add_col( new ListBlockCol_TaskCreatedBy( array('use_short_names'=>false,'indention'=>true)));
     $this->add_col(new ListBlockColTime(array('key' => 'estimated', 'name' => __("Est."), 'tooltip' => __("Estimated time in hours"), 'sort' => 0)));
     $this->add_col(new ListBlockCol_Milestone());
     $this->add_col(new ListBlockCol_EstimatedComplete());
     $this->add_col(new ListBlockCol_DaysLeft());
     $this->add_col(new ListBlockCol_TaskSumEfforts());
     if (confget('TASK_LIST_EFFORT_RELATION_COLUMN')) {
         $this->add_col(new ListBlockCol_TaskRelationEfforts());
     }
     $this->add_col(new ListBlockColPubLevel());
     ### functions ###
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskEdit')->id, 'name' => __('Edit'), 'id' => 'taskEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskNew')->id, 'name' => __('Add new Task'), 'id' => 'taskNew', 'icon' => 'new', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('taskNewBug')->id, 'name' => __('Report new Bug'), 'id' => 'taskNewBug', 'icon' => 'new', 'context_menu' => 'submit', 'dropdown_menu' => false)));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('commentNew')->id, 'name' => __('Add comment'), 'id' => 'commentNew', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksDelete')->id, 'name' => __('Delete'), 'id' => 'tasksDelete', 'icon' => 'delete', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksComplete')->id, 'name' => __('Status->Completed'), 'id' => 'tasksCompleted', 'icon' => 'complete', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksApproved')->id, 'name' => __('Status->Approved'), 'id' => 'tasksApproved', 'icon' => 'approve', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksClosed')->id, 'name' => __('Status->Closed'), 'id' => 'tasksClosed', 'icon' => 'close', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('tasksMoveToFolder')->id, 'name' => __('Move tasks'), 'id' => 'tasksMoveToFolder', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('effortNew')->id, 'name' => __('Log hours for select tasks'), 'id' => 'effortNew', 'icon' => 'loghours', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
     ### block style functions ###
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'list', 'name' => __('List', 'List sort mode'), 'params' => array('style' => 'list', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id))));
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'tree', 'name' => __('Tree', 'List sort mode'), 'params' => array('style' => 'tree', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id))));
     $this->groupings = new BlockFunction_grouping(array('target' => 'changeBlockStyle', 'key' => 'grouped', 'name' => __('Grouped', 'List sort mode'), 'params' => array('style' => 'grouped', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id)));
     $this->add_blockFunction($this->groupings);
     /**
      * @NOTE:
      * - if we deal with tasks of possibily multiple projects, we should list projects 
      *   in path that is shown below the task in "List" mode
      */
     if (!isset($this->filters['project'])) {
         $this->show_project_folder = true;
     }
     ### list groupings ###
     $this->groupings->groupings = array(new ListGroupingFolder(), new ListGroupingStatus(), new ListGroupingPrio(), new ListGroupingCreatedBy());
     $this->initOrderQueryOption('order_id, status, prio');
 }
Example #16
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     $this->id = 'people';
     $this->title = __("Your related people");
     $this->add_col(new ListBlockColSelect());
     $this->add_col(new ListBlockCol_PersonNickname());
     #$this->add_col( new ListBlockColFormat(array(
     #   'key'=>'nickname',
     #   'name'=>__("Name Short"),
     #   'tooltip'=>__("Shortnames used in other lists"),
     #   'sort'=>0,
     #   'format'=>'<nobr><a href="index.php?go=personView&amp;person={?id}">{?nickname}</a></nobr>'
     #)));
     $this->add_col(new ListBlockCol_PersonName());
     #$this->add_col( new ListBlockColFormat(array(
     #   'key'=>'name',
     #   'name'=>__("Person"),
     #   'tooltip'=>__("Task name. More Details as tooltips"),
     #   'sort'=>0,
     #   'format'=>'<nobr><span class="item person"><a class="item person" href="index.php?go=personView&amp;person={?id}">{?name}</a></span></nobr>'
     #)));
     $this->add_col(new ListBlockCol_PersonProfile());
     $this->add_col(new ListBlockColFormat(array('key' => 'personal_phone', 'name' => __("Private"), 'format' => '<nobr>{?personal_phone}</nobr>')));
     $this->add_col(new ListBlockColFormat(array('key' => 'mobile_phone', 'name' => __("Mobil"), 'format' => '<nobr>{?mobile_phone}</nobr>')));
     $this->add_col(new ListBlockColFormat(array('key' => 'office_phone', 'name' => __("Office"), 'format' => '<nobr>{?office_phone}</nobr>')));
     $this->add_col(new ListBlockColFormat(array('key' => 'tagline', 'name' => __("Tagline"), 'format' => '{?tagline}')));
     $this->add_col(new ListBlockColMethod(array('name' => __("Companies"), 'func' => 'getCompanyLinks', 'id' => 'companies')));
     $this->add_col(new ListBlockCol_PersonProjects());
     $this->add_col(new ListBlockColTimeAgo(array('name' => __("last login"), 'key' => 'last_login')));
     $this->add_col(new ListBlockCol_PersonChanges());
     /*$this->add_col( new ListBlockCol_ProjectEffortSum);
     
             $this->add_col( new ListBlockColMethod(array(
                 'name'=>"Tasks",
                 'tooltip'=>"Number of open Tasks",
                 'sort'=>0,
                 'func'=>'getNumTasks',
                 'style'=>'right'
             )));
             $this->add_col( new ListBlockColDate(array(
                 'key'=>'date_start',
                 'name'=>"Opened",
                 'tooltip'=>"Day the Project opened",
                 'sort'=>0,
             )));
             $this->add_col( new ListBlockColDate(array(
                 'key'=>'date_closed',
                 'name'=>"Closed",
                 'tooltip'=>"Day the Project state changed to closed",
                 'sort'=>0,
             )));
             */
     #---- functions ----
     global $PH;
     $this->add_function(new ListFunction(array('target' => $PH->getPage('personEdit')->id, 'name' => __('Edit person'), 'id' => 'personEdit', 'icon' => 'edit', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('personEditRights')->id, 'name' => __('Edit user rights'), 'id' => 'personEditRights', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('personDelete')->id, 'name' => __('Delete person'), 'id' => 'personDelete', 'icon' => 'delete')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('personNew')->id, 'name' => __('Create new person'), 'id' => 'personNew', 'icon' => 'new', 'context_menu' => 'submit')));
     $this->add_function(new ListFunction(array('target' => $PH->getPage('itemsAsBookmark')->id, 'name' => __('Mark as bookmark'), 'id' => 'itemsAsBookmark', 'context_menu' => 'submit')));
 }
Example #17
0
 public function __construct($args = NULL)
 {
     parent::__construct($args);
     global $PH;
     global $auth;
     $this->id = 'allchanges';
     $this->title = __("Changes");
     $this->id = "allchanges";
     $this->no_items_html = __('Nothing has changed.');
     $this->add_col(new ListBlockColSelect());
     ## from list_projectchanages.inc.php ##
     $this->add_col(new ListBlockCol_ChangesByPerson());
     $this->add_col(new ListBlockCol_ChangesEditType());
     $this->add_col(new ListBlockCol_ChangesItemType());
     $this->add_col(new ListBlockCol_AllChangesItemName());
     $this->add_col(new listBlockColDate(array('key' => 'modified', 'name' => __('modified'))));
     ### block style functions ###
     $this->add_blockFunction(new BlockFunction(array('target' => 'changeBlockStyle', 'key' => 'list', 'name' => __('List', 'List sort mode'), 'params' => array('style' => 'list', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id), 'default' => true)));
     $this->groupings = new BlockFunction_grouping(array('target' => 'changeBlockStyle', 'key' => 'grouped', 'name' => __('Grouped', 'List sort mode'), 'params' => array('style' => 'grouped', 'block_id' => $this->id, 'page_id' => $PH->cur_page->id)));
     $this->add_blockFunction($this->groupings);
     ### list groupings ###
     $this->groupings->groupings = array(new ListGroupingModifiedBy(), new ListGroupingItemType());
 }