public function _postSave($is_new) { if ($is_new) { TBGContext::setPermission("canseecomponent", $this->getID(), "core", 0, TBGContext::getUser()->getGroup()->getID(), 0, true); TBGEvent::createNew('core', 'TBGComponent::createNew', $this)->trigger(); } }
/** * Invoke a trigger * * @param string $module The module for which the trigger is active * @param string $identifier The trigger identifier * @param array $params Parameters to pass to the registered listeners * * @return unknown_type */ protected static function _trigger(TBGEvent $event, $return_when_processed = false) { $module = $event->getModule(); $identifier = $event->getIdentifier(); TBGLogging::log("Triggering {$module} - {$identifier}"); if (isset(self::$_registeredlisteners[$module][$identifier])) { foreach (self::$_registeredlisteners[$module][$identifier] as $trigger) { try { $cb_string = is_array($trigger) ? get_class($trigger[0]) . '::' . $trigger[1] : $trigger; TBGLogging::log('Running callback function ' . $cb_string); $retval = call_user_func($trigger, $event); if ($return_when_processed && $event->isProcessed()) { return true; } TBGLogging::log('done (Running callback function ' . $cb_string . ')'); } catch (Exception $e) { throw $e; } } } TBGLogging::log("done (Triggering {$module} - {$identifier})"); }
<td> <select name="<?php echo TBGSettings::SETTING_RETURN_FROM_LOGOUT; ?> " id="returnfromlogout" style="width: 400px;"<?php if ($access_level != TBGSettings::ACCESS_FULL) { ?> disabled<?php } ?> > <?php $return_routes = array('home' => __('Frontpage')); ?> <?php $return_routes = TBGEvent::createNew('core', 'setting_returnfromlogout', null, array(), $return_routes)->trigger()->getReturnList(); ?> <?php foreach ($return_routes as $route => $description) { ?> <option value="<?php echo $route; ?> "<?php if (TBGSettings::getLogoutReturnRoute() == $route) { ?> selected<?php } ?> ><?php
TBGEvent::createNew('core', 'viewissue_left_after_attachments', $issue)->trigger(); ?> <fieldset id="viewissue_related_information_container"> <legend> <?php echo image_tag('spinning_16.gif', array('style' => 'display: none;', 'id' => 'related_issues_indicator')) . __('Child issues (%count)', array('%count' => '<span id="viewissue_related_issues_count">' . count($issue->getChildIssues()) . '</span>')); ?> </legend> <div id="viewissue_related_information"> <?php include_component('main/relatedissues', array('issue' => $issue)); ?> </div> </fieldset> <fieldset id="viewissue_duplicate_issues_container"> <legend> <?php echo image_tag('spinning_16.gif', array('style' => 'display: none;', 'id' => 'duplicate_issues_indicator')) . __('Duplicate issues (%count)', array('%count' => '<span id="viewissue_duplicate_issues_count">' . $issue->getNumberOfDuplicateIssues() . '</span>')); ?> </legend> <div id="viewissue_duplicate_issues"> <?php include_component('main/duplicateissues', array('issue' => $issue)); ?> </div> </fieldset> <?php TBGEvent::createNew('core', 'viewissue_left_bottom', $issue)->trigger(); ?> <div style="clear: both; margin-bottom: 5px;"> </div>
if (TBGEvent::createNew('core', 'header_usermenu_decider')->trigger()->getReturnValue() !== false) { ?> <?php require THEBUGGENIE_CORE_PATH . 'templates/headerusermenu.inc.php'; ?> <?php } ?> </li> <?php TBGEvent::createNew('core', 'after_header_userinfo')->trigger(); ?> </ul> </nav> <?php if (TBGEvent::createNew('core', 'header_mainmenu_decider')->trigger()->getReturnValue() !== false) { ?> <?php require THEBUGGENIE_CORE_PATH . 'templates/submenu.inc.php'; ?> <?php } ?> <?php TBGEvent::createNew('core', 'header_menu_end')->trigger(); ?> <?php } ?> </header>
public function hasAccess() { $issue_ids = TBGIssueFilesTable::getTable()->getIssuesByFileID($this->getID()); foreach ($issue_ids as $issue_id) { $issue = new TBGIssue($issue_id); if ($issue->hasAccess()) { return true; } } $event = TBGEvent::createNew('core', 'TBGFile::hasAccess', $this); $event->setReturnValue(false); $event->triggerUntilProcessed(); return $event->getReturnValue(); }
/** * Constructor function * * @param B2DBRow $row */ public function _construct(B2DBRow $row, $foreign_key = null) { TBGEvent::createNew('core', 'TBGProject::__construct', $this)->trigger(); }
/** * Transition an issue to the outgoing step, based on request data if available * * @param TBGIssue $issue * @param TBGRequest $request */ public function transitionIssueToOutgoingStepFromRequest(TBGIssue $issue, $request = null) { $request = $request !== null ? $request : $this->_request; $this->getOutgoingStep()->applyToIssue($issue); if ($request->hasParameter('comment_body') && trim($request->getParameter('comment_body') != '')) { $this->_request = $request; TBGEvent::listen('core', 'TBGIssue::save', array($this, 'listenIssueSaveAddComment')); } if (!empty($this->_validation_errors)) { return false; } foreach ($this->getActions() as $action) { $action->perform($issue, $request); } $issue->save(); }
public function runAddUser(TBGRequest $request) { try { if (!TBGContext::getScope()->hasUsersAvailable()) { throw new Exception($this->getI18n()->__('This instance of The Bug Genie cannot add more users')); } if ($username = trim($request['username'])) { if (!TBGUser::isUsernameAvailable($username)) { if ($request->getParameter('mode') == 'import') { $user = TBGUser::getByUsername($username); $user->addScope(TBGContext::getScope()); return $this->renderJSON(array('imported' => true, 'message' => $this->getI18n()->__('The user was successfully added to this scope (pending user confirmation)'))); } elseif (TBGContext::getScope()->isDefault()) { throw new Exception($this->getI18n()->__('This username already exists')); } else { $this->getResponse()->setHttpStatus(400); return $this->renderJSON(array('allow_import' => true)); } } $user = new TBGUser(); $user->setUsername($username); $user->setRealname($request->getParameter('realname', $username)); $user->setBuddyname($request->getParameter('buddyname', $username)); $user->setEmail($request->getParameter('email')); $user->setGroup(TBGGroupsTable::getTable()->selectById((int) $request->getParameter('group_id', TBGSettings::get(TBGSettings::SETTING_USER_GROUP)))); $user->setEnabled(); $user->setActivated(); if ($request->hasParameter('password') && !(empty($request['password']) && empty($request['password_repeat']))) { if (empty($request['password']) || $request['password'] != $request['password_repeat']) { throw new Exception($this->getI18n()->__('Please enter the same password twice')); } $password = $request['password']; $user->setPassword($password); } else { $password = TBGUser::createPassword(); $user->setPassword($password); } $user->setJoined(); $user->save(); foreach ((array) $request['teams'] as $team_id) { $user->addToTeam(TBGTeamsTable::getTable()->selectById((int) $team_id)); } TBGEvent::createNew('core', 'config.createuser.save', $user, array('password' => $password))->trigger(); } else { throw new Exception($this->getI18n()->__('Please enter a username')); } $this->getResponse()->setTemplate('configuration/findusers'); $this->too_short = false; $this->created_user = true; $this->users = array($user); $this->total_results = 1; $this->title = $this->getI18n()->__('User %username created', array('%username' => $username)); $this->total_count = TBGUser::getUsersCount(); $this->more_available = TBGContext::getScope()->hasUsersAvailable(); } catch (Exception $e) { $this->getResponse()->setHttpStatus(400); return $this->renderJSON(array('error' => $e->getMessage())); } }
public function addScope(TBGScope $scope, $notify = true) { if (!$this->isMemberOfScope($scope)) { TBGUserScopesTable::getTable()->addUserToScope($this->getID(), $scope->getID()); if ($notify) { TBGEvent::createNew('core', 'TBGUser::addScope', $this, array('scope' => $scope))->trigger(); } $this->_scopes = null; $this->_unconfirmed_scopes = null; $this->_confirmed_scopes = null; } }
public function runUpdateIssueDetails(TBGRequest $request) { $this->error = false; try { $i18n = TBGContext::getI18n(); $issue = TBGIssue::getIssueFromLink($request->getParameter('issue_no')); if ($issue->getProject()->getID() != $this->selected_project->getID()) { throw new Exception($i18n->__('This issue is not valid for this project')); } if (!$issue instanceof TBGIssue) { die; } $workflow_transition = null; if ($passed_transition = $request->getParameter('workflow_transition')) { //echo "looking for transition "; $key = str_replace(' ', '', mb_strtolower($passed_transition)); //echo $key . "\n"; foreach ($issue->getAvailableWorkflowTransitions() as $transition) { //echo str_replace(' ', '', mb_strtolower($transition->getName())) . "?"; if (strpos(str_replace(' ', '', mb_strtolower($transition->getName())), $key) !== false) { $workflow_transition = $transition; //echo "found transition " . $transition->getID(); break; } //echo "no"; } if (!$workflow_transition instanceof TBGWorkflowTransition) { throw new Exception("This transition ({$key}) is not valid"); } } $fields = $request->getRawParameter('fields', array()); $return_values = array(); if ($workflow_transition instanceof TBGWorkflowTransition) { foreach ($fields as $field_key => $field_value) { $classname = "TBG" . ucfirst($field_key); $method = "set" . ucfirst($field_key); $choices = $classname::getAll(); $found = false; foreach ($choices as $choice_key => $choice) { if (strpos(str_replace(' ', '', strtolower($choice->getName())), str_replace(' ', '', strtolower($field_value))) !== false) { $request->setParameter($field_key . '_id', $choice->getId()); break; } } } $request->setParameter('comment_body', $request->getParameter('message')); $return_values['applied_transition'] = $workflow_transition->getName(); if ($workflow_transition->validateFromRequest($request)) { $retval = $workflow_transition->transitionIssueToOutgoingStepFromRequest($issue, $request); $return_values['transition_ok'] = $retval === false ? false : true; } else { $return_values['transition_ok'] = false; $return_values['message'] = "Please pass all information required for this transition"; } } elseif ($issue->isUpdateable()) { foreach ($fields as $field_key => $field_value) { try { if (in_array($field_key, array_merge(array('title', 'state'), TBGDatatype::getAvailableFields(true)))) { switch ($field_key) { case 'state': $issue->setState($field_value == 'open' ? TBGIssue::STATE_OPEN : TBGIssue::STATE_CLOSED); break; case 'title': if ($field_value != '') { $issue->setTitle($field_value); } else { throw new Exception($i18n->__('Invalid title')); } break; case 'description': case 'reproduction_steps': $method = "set" . ucfirst($field_key); $issue->{$method}($field_value); break; case 'status': case 'resolution': case 'reproducability': case 'priority': case 'severity': case 'category': $classname = "TBG" . ucfirst($field_key); $method = "set" . ucfirst($field_key); $choices = $classname::getAll(); $found = false; foreach ($choices as $choice_key => $choice) { if (str_replace(' ', '', strtolower($choice->getName())) == str_replace(' ', '', strtolower($field_value))) { $issue->{$method}($choice); $found = true; } } if (!$found) { throw new Exception('Could not find this value'); } break; case 'percent_complete': $issue->setPercentCompleted($field_value); break; case 'owner': case 'assignee': $set_method = "set" . ucfirst($field_key); $unset_method = "un{$set_method}"; switch (strtolower($field_value)) { case 'me': $issue->{$set_method}(TBGContext::getUser()); break; case 'none': $issue->{$unset_method}(); break; default: try { $user = TBGUser::findUser(strtolower($field_value)); if ($user instanceof TBGUser) { $issue->{$set_method}($user); } } catch (Exception $e) { throw new Exception('No such user found'); } break; } break; case 'estimated_time': case 'spent_time': $set_method = "set" . ucfirst(str_replace('_', '', $field_key)); $issue->{$set_method}($field_value); break; case 'milestone': $found = false; foreach ($this->selected_project->getAllMilestones() as $milestone) { if (str_replace(' ', '', strtolower($milestone->getName())) == str_replace(' ', '', strtolower($field_value))) { $issue->setMilestone($milestone->getID()); $found = true; } } if (!$found) { throw new Exception('Could not find this milestone'); } break; default: throw new Exception($i18n->__('Invalid field')); } } $return_values[$field_key] = array('success' => true); } catch (Exception $e) { $return_values[$field_key] = array('success' => false, 'error' => $e->getMessage()); } } } TBGEvent::listen('core', 'TBGIssue::save', function (TBGEvent $event) { $comment = $event->getParameter('comment'); $comment->setContent($request->getRawParameter('message') . "\n\n" . $comment->getContent()); $comment->setSystemComment(false); $comment->save(); }); if (!$workflow_transition instanceof TBGWorkflowTransition) { $issue->getWorkflowStep()->getWorkflow()->moveIssueToMatchingWorkflowStep($issue); } if (!array_key_exists('transition_ok', $return_values) || $return_values['transition_ok']) { $issue->save(); } $this->return_values = $return_values; } catch (Exception $e) { //$this->getResponse()->setHttpStatus(400); return $this->renderJSON(array('failed' => true, 'error' => $e->getMessage())); } }
public static function getTemplates() { $templates = array('main/updateissueproperties' => 'Set issue properties or add comment'); $event = TBGEvent::createNew('core', 'workflow_templates', null, array(), $templates)->trigger(); return $event->getReturnList(); }
<br> <input type="submit" id="login_button" value="<?php echo __('Continue'); ?> "> <span id="login_indicator" style="display: none;"><?php echo image_tag('spinning_20.gif'); ?> </span> </div> </form> </div> </div> </div> <?php TBGEvent::createNew('core', 'login_form_pane')->trigger(array_merge(array('selected_tab' => $selected_tab), $options)); ?> <?php if (TBGSettings::get('allowreg') == true) { ?> <?php include_template('main/loginregister', array('selected_tab' => $selected_tab)); ?> <?php } ?> </div> <div id="backdrop_detail_indicator" style="text-align: center; padding: 50px; display: none;"> <?php echo image_tag('spinning_32.gif'); ?>
echo link_tag(make_url('switch_back_user'), image_tag('switchuser.png') . __('Switch back to original user')); ?> <?php } ?> <?php if ($tbg_user->canAccessConfigurationPage()) { ?> <?php echo link_tag(make_url('configure'), image_tag('tab_config.png') . __('Configure %thebuggenie_name', array('%thebuggenie_name' => TBGSettings::getTBGname()))); ?> <?php } ?> <?php TBGEvent::createNew('core', 'user_dropdown_reg')->trigger(); ?> <?php echo link_tag('http://www.thebuggenie.com/help/' . TBGContext::getRouting()->getCurrentRouteName(), image_tag('help.png') . __('Help for this page'), array('id' => 'global_help_link')); ?> <a href="<?php echo make_url('logout'); ?> " onclick="<?php if (TBGSettings::isPersonaAvailable()) { ?> if (navigator.id) { navigator.id.logout();return false; }<?php } ?> "><?php echo image_tag('logout.png') . __('Logout');
<div class="project_header"> <div class="project_header_right button-group"> <?php TBGEvent::createNew('core', 'project_header_buttons')->trigger(); ?> <?php if ($selected_project->hasDownloads() && $tbg_response->getPage() != 'project_releases') { ?> <?php echo link_tag(make_url('project_releases', array('project_key' => $selected_project->getKey())), image_tag('icon_download.png') . __('Download'), array('class' => 'button button-orange')); ?> <?php } ?> <?php if ($selected_project->hasParent()) { ?> <?php echo link_tag(make_url('project_dashboard', array('project_key' => $selected_project->getParent()->getKey())), image_tag($selected_project->getParent()->getSmallIconName(), array('style' => 'width: 16px; height: 16px;'), $selected_project->getParent()->hasSmallIcon()) . __('Up to %parent', array('%parent' => $selected_project->getParent()->getName())), array('class' => 'button button-silver')); ?> <?php } ?> </div> <div class="project_header_left"> <div id="project_name"> <?php echo image_tag($selected_project->getLargeIconName(), array('class' => 'logo', 'style' => 'width: 32px; height: 32px;'), $selected_project->hasLargeIcon()); ?> <span id="project_name_span"><?php echo $selected_project->getName();
?> </a> <?php } else { ?> <span class="faded_out"><?php echo __('No documentation URL provided'); ?> </span> <?php } ?> </td> </tr> <?php TBGEvent::createNew('core', 'configuration/projectinfo', $project)->trigger(); if ($access_level == TBGSettings::ACCESS_FULL) { ?> <tr> <td colspan="2" style="padding: 10px 0 10px 10px; text-align: right;"> <div style="float: left; font-size: 13px; padding-top: 2px; font-style: italic;" class="config_explanation"><?php echo __('When you are done, click "%save%" to save your changes', array('%save%' => __('Save'))); ?> </div> <input type="submit" id="project_submit_settings_button" style="float: right; padding: 0 10px 0 10px; font-size: 14px; font-weight: bold;" value="<?php echo __('Save'); ?> "> <span id="project_info_indicator" style="display: none; float: right;"><?php echo image_tag('spinning_20.gif'); ?>
public static function listen_TBGFile_hasAccess(TBGEvent $event) { $file = $event->getSubject(); if ($file->getID() == self::getHeaderIconID() || $file->getID() == self::getFaviconID()) { $event->setReturnValue(true); $event->setProcessed(); } }
public function listen_quicksearchDropdownFoundItems(TBGEvent $event) { $searchterm = $event->getSubject(); list($resultcount, $articles) = TBGWikiArticle::findByArticleNameAndProject($searchterm, TBGContext::getCurrentProject()); TBGActionComponent::includeTemplate('publish/quicksearch_dropdown_founditems', array('searchterm' => $searchterm, 'articles' => $articles, 'resultcount' => $resultcount)); }
} else { ?> <ul id="dashboard"> <?php foreach ($views as $id => $view) { ?> <li style="clear: none;" id="dashboard_container_<?php echo $id; ?> "> <?php include_component('main/dashboardview', array('view' => $view, 'show' => false)); ?> </li> <?php } ?> </ul> <?php include_template('main/dashboardjavascript'); ?> <?php } ?> <?php TBGEvent::createNew('core', 'project_dashboard_bottom')->trigger(); ?> </td> </tr> </table>
public function doSave($options = array(), $reason = null) { if (TBGArticlesTable::getTable()->doesNameConflictExist($this->_name, $this->_id, TBGContext::getScope()->getID())) { if (!array_key_exists('overwrite', $options) || !$options['overwrite']) { throw new Exception(TBGContext::getI18n()->__('Another article with this name already exists')); } } $user_id = TBGContext::getUser() instanceof TBGUser ? TBGContext::getUser()->getID() : 0; if (!isset($options['revert']) || !$options['revert']) { $revision = TBGArticleHistoryTable::getTable()->addArticleHistory($this->_name, $this->_old_content, $this->_content, $user_id, $reason); } else { $revision = null; } TBGArticleLinksTable::getTable()->deleteLinksByArticle($this->_name); TBGArticleCategoriesTable::getTable()->deleteCategoriesByArticle($this->_name); $this->save(); $this->_old_content = $this->_content; if (mb_substr($this->getContent(), 0, 10) == "#REDIRECT ") { $content = explode("\n", $this->getContent()); preg_match('/(\\[\\[([^\\]]*?)\\]\\])$/im', mb_substr(array_shift($content), 10), $matches); if (count($matches) == 3) { return; } } list($links, $categories) = $this->_retrieveLinksAndCategoriesFromContent($options); foreach ($links as $link => $occurrences) { TBGArticleLinksTable::getTable()->addArticleLink($this->_name, $link); } foreach ($categories as $category => $occurrences) { TBGArticleCategoriesTable::getTable()->addArticleCategory($this->_name, $category, $this->isCategory()); } $this->_history = null; TBGEvent::createNew('core', 'TBGWikiArticle::doSave', $this, compact('reason', 'revision', 'user_id'))->trigger(); return true; }
><?php echo javascript_link_tag(__('Editions and components'), array('onclick' => "TBG.Main.Helpers.tabSwitcher('tab_hierarchy', 'project_config_menu');")); ?> </li> <li id="tab_developers"<?php if ($selected_tab == 'developers') { ?> class="selected"<?php } ?> ><?php echo javascript_link_tag(__('Team'), array('onclick' => "TBG.Main.Helpers.tabSwitcher('tab_developers', 'project_config_menu');")); ?> </li> <li id="tab_permissions"<?php if ($selected_tab == 'permissions') { ?> class="selected"<?php } ?> ><?php echo javascript_link_tag(__('Roles and permissions'), array('onclick' => "TBG.Main.Helpers.tabSwitcher('tab_permissions', 'project_config_menu');")); ?> </li> <?php TBGEvent::createNew('core', 'config_project_tabs')->trigger(array('selected_tab' => $selected_tab)); ?> </ul> <?php } }
public function getPredefinedBreadcrumbLinks($type, $project = null) { $i18n = TBGContext::getI18n(); $links = array(); switch ($type) { case 'main_links': $links[] = array('url' => TBGContext::getRouting()->generate('home'), 'title' => $i18n->__('Frontpage')); $links[] = array('url' => TBGContext::getRouting()->generate('dashboard'), 'title' => $i18n->__('Personal dashboard')); $links[] = array('title' => $i18n->__('Issues')); $links[] = array('title' => $i18n->__('Teams')); $links[] = array('title' => $i18n->__('Clients')); $links = TBGEvent::createNew('core', 'breadcrumb_main_links', null, array(), $links)->trigger()->getReturnList(); if (TBGContext::getUser()->canAccessConfigurationPage()) { $links[] = array('url' => make_url('configure'), 'title' => $i18n->__('Configure The Bug Genie')); } $links[] = array('url' => TBGContext::getRouting()->generate('about'), 'title' => $i18n->__('About %sitename%', array('%sitename%' => TBGSettings::getTBGname()))); $links[] = array('url' => TBGContext::getRouting()->generate('account'), 'title' => $i18n->__('Account details')); break; case 'project_summary': $links[] = array('url' => TBGContext::getRouting()->generate('project_dashboard', array('project_key' => $project->getKey())), 'title' => $i18n->__('Dashboard')); $links[] = array('url' => TBGContext::getRouting()->generate('project_scrum', array('project_key' => $project->getKey())), 'title' => $i18n->__('Sprint planning')); $links[] = array('url' => TBGContext::getRouting()->generate('project_roadmap', array('project_key' => $project->getKey())), 'title' => $i18n->__('Roadmap')); $links[] = array('url' => TBGContext::getRouting()->generate('project_team', array('project_key' => $project->getKey())), 'title' => $i18n->__('Team overview')); $links[] = array('url' => TBGContext::getRouting()->generate('project_statistics', array('project_key' => $project->getKey())), 'title' => $i18n->__('Statistics')); $links[] = array('url' => TBGContext::getRouting()->generate('project_timeline', array('project_key' => $project->getKey())), 'title' => $i18n->__('Timeline')); $links[] = array('url' => TBGContext::getRouting()->generate('project_reportissue', array('project_key' => $project->getKey())), 'title' => $i18n->__('Report an issue')); $links[] = array('url' => TBGContext::getRouting()->generate('project_issues', array('project_key' => $project->getKey())), 'title' => $i18n->__('Issues')); $links = TBGEvent::createNew('core', 'breadcrumb_project_links', null, array(), $links)->trigger()->getReturnList(); break; case 'client_list': foreach (TBGClient::getAll() as $client) { if ($client->hasAccess()) { $links[] = array('url' => TBGContext::getRouting()->generate('client_dashboard', array('client_id' => $client->getID())), 'title' => $client->getName()); } } break; case 'team_list': foreach (TBGTeam::getAll() as $team) { if ($team->hasAccess()) { $links[] = array('url' => TBGContext::getRouting()->generate('team_dashboard', array('team_id' => $team->getID())), 'title' => $team->getName()); } } break; } return $links; }
<?php include_component('dashboardview', array('view' => $view, 'show' => false)); ?> </li> <?php } ?> </ul> <?php include_template('main/dashboardjavascript'); ?> <?php } ?> <?php TBGEvent::createNew('core', 'dashboard_main_bottom')->trigger(); ?> </td> <td id="dashboard_righthand" class="side_bar<?php echo TBGSettings::getToggle('dashboard_righthand') ? ' collapsed' : ''; ?> "> <div class="collapser_link" onclick="TBG.Main.Dashboard.sidebar('<?php echo make_url('set_toggle_state', array('key' => 'dashboard_righthand', 'state' => '')); ?> ', 'dashboard_righthand');"> <a href="javascript:void(0);"> <?php echo image_tag('sidebar_expand.png', array('class' => 'collapser')); ?> <?php
?> <?php echo $content; ?> <?php TBGLogging::log('done (rendering content)'); ?> </div> <?php TBGEvent::createNew('core', 'footer_begin')->trigger(); ?> <?php require THEBUGGENIE_CORE_PATH . 'templates/footer.inc.php'; ?> <?php TBGEvent::createNew('core', 'footer_end')->trigger(); ?> </div> <script type="text/javascript"> document.observe('dom:loaded', function() { var f_init = function() {TBG.initialize({ basepath: '<?php echo TBGContext::getTBGPath(); ?> ', data_url: '<?php echo make_url('userdata'); ?> ', autocompleter_url: '<?php echo TBGContext::isProjectContext() ? make_url('project_quicksearch', array('project_key' => TBGContext::getCurrentProject()->getKey())) : make_url('quicksearch'); ?> '})}; <?php
$link_text .= strlen($issue->getTitle()) > 43 ? substr($issue->getTitle(), 0, 40) . '...' : $issue->getTitle(); $classes = $issue->isClosed() ? 'issue_closed' : ''; ?> <?php echo link_tag(make_url('viewissue', array('project_key' => $issue->getProject()->getKey(), 'issue_no' => $issue->getFormattedIssueNo())), $link_text, array('class' => $classes)); ?> <?php } ?> <?php } ?> </div> </div> <?php TBGEvent::createNew('core', 'after_header_userinfo')->trigger(); ?> </div> </td> </tr> </table> <?php require THEBUGGENIE_CORE_PATH . 'templates/submenu.inc.php'; ?> <?php if (!TBGContext::isDebugMode()) { ?> <div class="rounded_box iceblue borderless infobox" style="margin: 5px; display: none;" id="firebug_warning"> <div style="padding: 5px;"> <?php echo image_tag('icon_info_big.png', array('style' => 'float: left; margin: 5px 5px 0 0;'));
</span> <div class="hidden url"><?php echo TBGContext::isProjectContext() ? make_url('project_issues', array('project_key' => TBGContext::getCurrentProject()->getKey())) : make_url('search'); ?> ?fs[text][v]=<?php echo $searchterm; ?> &fs[text][o]=<?php echo urlencode('='); ?> </div> </li> <?php } ?> <?php } else { ?> <li class="disabled no_issues_found"> <?php echo __('No issues found matching your query'); ?> </li> <?php } ?> <?php TBGEvent::createNew('core', 'quicksearch_dropdown_founditems', $searchterm)->trigger(); ?> </ul>
_link').show();$('<?php echo $customdatatype->getKey(); ?> _additional_div').hide();$('<?php echo $customdatatype->getKey(); ?> _id_additional').setValue(0);"><?php echo image_tag('undo.png', array('style' => 'float: none; margin-left: 5px;')); ?> </a> <?php } ?> </div> </li> <?php } ?> <?php TBGEvent::createNew('core', 'reportissue.listfields')->trigger(); ?> </ul> <div style="clear: both;"> </div> </div> </div> <?php } ?> </form> </div>
?> </div> <?php } ?> <div style="padding: 2px;"> <a href="javascript:void(0);" onclick="showFadedBackdrop('<?php echo make_url('get_partial_for_backdrop', array('key' => 'usercard', 'user_id' => $user->getID())); ?> ');$('bud_<?php echo $user->getUsername() . "_" . $rnd_no; ?> ').hide();"><?php echo __('Show user details'); ?> </a> </div> <?php TBGEvent::createNew('core', 'useractions_bottom', $user)->trigger(); ?> </div> <div style="text-align: right; padding: 3px; font-size: 9px;"><a href="javascript:void(0);" onclick="$('bud_<?php echo $user->getUsername() . "_" . $rnd_no; ?> ').toggle();"><?php echo __('Close this menu'); ?> </a></div> </div> <?php }
echo __('Click "%save%" to save your profile settings', array('%save%' => __('Save'))); ?> </div> <input type="submit" id="submit_settings_button" style="float: right; padding: 0 10px 0 10px; font-size: 14px; font-weight: bold;" value="<?php echo __('Save'); ?> "> <span id="profile_settings_save_indicator" style="display: none; float: right;"><?php echo image_tag('spinning_20.gif'); ?> </span> </div> </form> </div> <?php TBGEvent::createNew('core', 'account_tab_panes')->trigger(); ?> <?php foreach (TBGContext::getModules() as $module_name => $module) { ?> <?php if ($module->hasAccountSettings()) { ?> <div id="tab_settings_<?php echo $module_name; ?> _pane" style="display: none;"> <form accept-charset="<?php echo TBGContext::getI18n()->getCharset(); ?> " action="<?php
echo __('%user_name posted a %comment on %article_name', array('%user_name' => get_component_html('main/userdropdown', array('user' => $notification->getTriggeredByUser())), '%comment' => link_tag(make_url('publish_article', array('article_name' => $notification->getTarget()->getTarget()->getName())) . '#comment_' . $notification->getTarget()->getID(), __('%username_posted_a comment %on_issue', array('%username_posted_a' => '', '%on_issue' => ''))), '%article_name' => link_tag(make_url('publish_article', array('article_name' => $notification->getTarget()->getTarget()->getName())), $notification->getTarget()->getTarget()->getName()))); ?> </h1> <?php break; case TBGNotification::TYPE_ARTICLE_UPDATED: ?> <h1> <time><?php echo tbg_formatTime($notification->getCreatedAt(), 20); ?> </time> <?php echo __('%user_name updated %article_name', array('%user_name' => get_component_html('main/userdropdown', array('user' => $notification->getTriggeredByUser())), '%article_name' => link_tag(make_url('publish_article', array('article_name' => $notification->getTarget()->getTarget()->getName())), $notification->getTarget()->getTarget()->getName()))); ?> </h1> <?php break; default: TBGEvent::createNew('core', '_notification_view', $notification)->trigger(); } ?> </li> <?php } ?> <?php } ?> </ul>