?> <a href="javascript:void(0);" <?php if (TBGContext::getRouting()->getCurrentRouteName() != 'login_page') { ?> onclick="TBG.Main.Login.showLogin('regular_login_container');"<?php } ?> ><?php echo image_tag($tbg_user->getAvatarURL(true), array('alt' => '[avatar]', 'class' => 'guest_avatar'), true) . __('You are not logged in'); ?> </a> <?php } else { ?> <?php echo link_tag(make_url('dashboard'), image_tag($tbg_user->getAvatarURL(true), array('alt' => '[avatar]', 'id' => 'header_avatar'), true) . '<span id="header_user_fullname">' . tbg_decodeUTF8($tbg_user->getDisplayName()) . '</span>'); ?> <?php } ?> <?php if (TBGContext::getRouting()->getCurrentRouteName() != 'login_page') { ?> <?php echo javascript_link_tag(image_tag('tabmenu_dropdown.png', array('class' => 'menu_dropdown')), array('onmouseover' => "")); ?> <?php } ?> </div> <?php
protected function _parseText($options = array()) { $options = array_merge($options, $this->options); framework\Context::loadLibrary('common'); $output = ""; $text = $this->text; if (!isset($this->options['plain'])) { $this->list_level_types = array(); $this->list_level = 0; $this->deflist = false; $this->ignore_newline = false; $text = preg_replace_callback('/<(nowiki|pre)>(.*)<\\/(\\1)>(?!<\\/(\\1)>)/ismU', array($this, "_parse_save_nowiki"), $text); $text = preg_replace_callback('/[\\{]{3,3}([\\d|\\w|\\|]*)[\\}]{3,3}/ismU', array($this, "_parse_insert_variables"), $text); $text = preg_replace_callback('/(?<!\\{)[\\{]{2,2}([^{^}.]*)[\\}]{2,2}(?!\\})/ismU', array($this, "_parse_insert_template"), $text); if (isset($this->options['included'])) { $text = preg_replace_callback('/<noinclude>(.+?)<\\/noinclude>(?!<\\/noinclude>)/ism', array($this, "_parse_remove_noinclude"), $text); $text = preg_replace_callback('/<includeonly>(.+?)<\\/includeonly>(?!<\\/includeonly>)/ism', array($this, "_parse_preserve_includeonly"), $text); return $text; } if (!isset($this->options['included'])) { $text = preg_replace_callback('/<includeonly>(.+?)<\\/includeonly>(?!<\\/includeonly>)/ism', array($this, "_parse_remove_includeonly"), $text); $text = preg_replace_callback('/<noinclude>(.+?)<\\/noinclude>(?!<\\/noinclude>)/ism', array($this, "_parse_preserve_noinclude"), $text); } $text = preg_replace_callback('/<source((?:\\s+[^\\s]+=".*")*)>\\s*?(.+)\\s*?<\\/source>/ismU', array($this, "_parse_save_code"), $text); // Thanks to Mike Smith (scgtrp) for the above regexp $text = tbg_decodeUTF8($text, true); $text = preg_replace_callback('/<(strike|u|pre|tt|s|del|ins|u|blockquote|div|span|font|sub|sup)(\\s.*)?>(.*)<\\/(\\1)>/ismU', array($this, '_parse_allowed_tags'), $text); $text = str_replace('<br>', '<br>', $text); $lines = explode("\n", $text); foreach ($lines as $line) { if (mb_substr($line, -1) == "\r") { $line = mb_substr($line, 0, -1); } $output .= $this->_parse_line($line, $options); } // Check if we need to close any tags in case the list items, etc were the last line if ($this->list_level > 0) { $output .= $this->_parse_list(false, true); } if ($this->deflist) { $output .= $this->_parse_definitionlist(false, true); } if ($this->preformat) { $output .= $this->_parse_preformat(false, true); } if ($this->quote) { $output .= $this->_parse_quote(false, true); } $output .= $this->_parse_tablecloser(false); $this->nowikis = array_reverse($this->nowikis); $this->codeblocks = array_reverse($this->codeblocks); $this->elinks = array_reverse($this->elinks); if (!array_key_exists('ignore_toc', $options)) { $output = preg_replace_callback('/\\{\\{TOC\\}\\}/', array($this, "_parse_add_toc"), $output); } else { $output = str_replace('{{TOC}}', '', $output); } $output = preg_replace_callback('/~~~NOWIKI~~~/i', array($this, "_parse_restore_nowiki"), $output); if (!isset($options['no_code_highlighting'])) { $output = preg_replace_callback('/~~~CODE~~~/Ui', array($this, "_parse_restore_code"), $output); } $output = preg_replace_callback('/~~~ILINK~~~/i', array($this, "_parse_restore_ilink"), $output); $output = preg_replace_callback('/~~~ELINK~~~/i', array($this, "_parse_restore_elink"), $output); } else { $text = nl2br(tbg_decodeUTF8($text, true)); $text = preg_replace_callback(self::getIssueRegex(), array($this, '_parse_issuelink'), $text); $text = preg_replace_callback(self::getMentionsRegex(), array($this, '_parse_mention'), $text); $output = $text; } return $output; }
?> <a href="javascript:void(0);" onclick="showFadedBackdrop('<?php echo make_url('get_partial_for_backdrop', array('key' => 'login')); ?> ')"><?php echo __('You are not logged in'); ?> </a> <?php } else { ?> <?php $name = TBGContext::getUser()->getRealname() == '' ? TBGContext::getUser()->getBuddyname() : TBGContext::getUser()->getRealname(); ?> <?php echo link_tag(make_url('dashboard'), tbg_decodeUTF8($name)); ?> <?php } ?> </td> <td class="header_userlinks"> <div class="dropdown_separator"> <?php echo javascript_link_tag(image_tag('tabmenu_dropdown.png', array('class' => 'menu_dropdown')), array('onmouseover' => "")); ?> </div> </td> </tr> </table> <div class="rounded_box blue tab_menu_dropdown user_menu_dropdown shadowed">
<?php echo link_tag(make_url('viewissue', array('project_key' => $issue->getProject()->getKey(), 'issue_no' => $issue->getFormattedIssueNo())), $issue_title, array('class' => 'issue_open')); ?> <br> <span class="user"> <?php if (($user = $comment->getPostedBy()) instanceof \thebuggenie\core\entities\User) { ?> <?php echo __('%username (%buddy_name) said', array('%username' => $user->getUsername(), '%buddy_name' => $user->getBuddyname())); ?> <?php } else { ?> <?php echo __('Unknown user said'); ?> <?php } ?> : </span> <?php echo '<div class="timeline_inline_details">'; echo nl2br(tbg_truncateText(tbg_decodeUTF8($comment->getContent()))); echo '</div>'; ?> </td> </tr> <?php }
<span class="faded_out" id="no_title" <?php if ($issue->getTitle() != '') { ?> style="display: none;" <?php } ?> ><?php echo __('Nothing entered.'); ?> </span> <span id="title_name" title="<?php echo tbg_decodeUTF8($issue->getTitle()); ?> "> <?php echo tbg_decodeUTF8($issue->getTitle()); ?> </span> </span> </span> <?php if ($issue->isEditable() && $issue->canEditTitle()) { ?> <span id="title_change" style="display: none;"> <form id="title_form" action="<?php echo make_url('issue_setfield', array('project_key' => $issue->getProject()->getKey(), 'issue_id' => $issue->getID(), 'field' => 'title')); ?> " method="post" onSubmit="TBG.Issues.Field.set('<?php echo make_url('issue_setfield', array('project_key' => $issue->getProject()->getKey(), 'issue_id' => $issue->getID(), 'field' => 'title')); ?> ', 'title'); return false;">
<?php if ($p_issues = $issue->getParentIssues()) { ?> <?php include_template('issueparent_crumbs', array('issue' => array_shift($p_issues), 'parent' => true)); } ?> <span class="issue_state <?php echo $issue->isClosed() ? 'closed' : 'open'; ?> "><?php echo $issue->isClosed() ? __('Closed') : __('Open'); ?> </span> <?php $it_string = __('%issuetype %issue_no', array('%issuetype' => $issue->hasIssueType() ? $issue->getIssueType()->getName() : __('Unknown issuetype'), '%issue_no' => $issue->getFormattedIssueNo(true))); echo link_tag(make_url('viewissue', array('project_key' => $issue->getProject()->getKey(), 'issue_no' => $issue->getFormattedIssueNo())), $it_string, array('title' => isset($parent) && $parent ? $it_string . ': ' . tbg_decodeUTF8($issue->getTitle()) : '')); if (isset($parent) && $parent) { echo ' » '; }
protected function _parseText($options = array()) { TBGContext::loadLibrary('common'); self::$current_parser = $this; $this->list_level_types = array(); $this->list_level = 0; $this->deflist = false; $this->ignore_newline = false; $output = ""; $text = $this->text; $text = preg_replace_callback('/<nowiki>(.+?)<\\/nowiki>(?!<\\/nowiki>)/ism', array($this, "_parse_save_nowiki"), $text); $text = preg_replace_callback('/<source((?:\\s+[^\\s]+=".*")*)>\\s*?(.+)\\s*?<\\/source>/ismU', array($this, "_parse_save_code"), $text); // Thanks to Mike Smith (scgtrp) for the above regexp $text = tbg_decodeUTF8($text, true); $text = preg_replace('/<((\\/)?u|(\\/)?strike|br|code)>/ism', '<\\1>', $text); $lines = explode("\n", $text); foreach ($lines as $line) { if (substr($line, -1) == "\r") { $line = substr($line, 0, -1); } $output .= $this->_parse_line($line, $options); } $this->nowikis = array_reverse($this->nowikis); $this->codeblocks = array_reverse($this->codeblocks); $this->elinks = array_reverse($this->elinks); if (!array_key_exists('ignore_toc', $options)) { $output = preg_replace_callback('/\\{\\{TOC\\}\\}/', array($this, "_parse_add_toc"), $output); } $output = preg_replace_callback('/\\|\\|\\|NOWIKI\\|\\|\\|/i', array($this, "_parse_restore_nowiki"), $output); if (!isset($options['no_code_highlighting'])) { $output = preg_replace_callback('/\\|\\|\\|CODE\\|\\|\\|/Ui', array($this, "_parse_restore_code"), $output); } $output = preg_replace_callback('/~~~ILINK~~~/i', array($this, "_parse_restore_ilink"), $output); $output = preg_replace_callback('/~~~ELINK~~~/i', array($this, "_parse_restore_elink"), $output); self::$current_parser = null; return $output; }
?> selected="selected" <?php } ?> ><?php echo __('Visible for me, developers and administrators only'); ?> </option> </select> <br /> <label for="comment_bodybox"><?php echo __('Comment'); ?> </label><br /> <?php include_template('main/textarea', array('area_name' => 'comment_body', 'area_id' => 'comment_bodybox', 'height' => '200px', 'width' => '970px', 'value' => tbg_decodeUTF8($comment->getContent(), true))); ?> <div id="comment_edit_indicator_<?php echo $comment->getID(); ?> " style="display: none;"> <?php echo image_tag('spinning_16.gif', array('class' => 'spinning')); ?> </div> <div id="comment_edit_controls_<?php echo $comment->getID(); ?> " class="comment_controls"> <input type="submit" class="comment_editsave" value="<?php echo __('Save changes');
?> </option> <option value="0"<?php if (!$comment->isPublic()) { ?> selected="selected" <?php } ?> ><?php echo __('Visible for me, developers and administrators only'); ?> </option> </select> <br /> <?php include_component('main/textarea', array('area_name' => 'comment_body', 'target_type' => $comment->getTargetType(), 'target_id' => $comment->getTargetId(), 'area_id' => 'comment_reply_' . $comment->getID() . '_bodybox', 'height' => '200px', 'width' => '100%', 'syntax' => \thebuggenie\core\framework\Settings::getSyntaxClass($comment->getSyntax()), 'value' => tbg_decodeUTF8("\n\n\n'''" . __('%user wrote:', array('%user' => $comment->getPostedBy() instanceof \thebuggenie\core\entities\common\Identifiable ? $comment->getPostedBy()->getName() : __('Unknown user'))) . "'''\n>" . str_replace("\n", "\n> ", wordwrap(html_entity_decode(strip_tags(tbg_decodeUTF8($comment->getContent(), true)), ENT_COMPAT, \thebuggenie\core\framework\Context::getI18n()->getCharset()), 75, "\n")) . "\n", true))); ?> <div id="comment_reply_indicator_<?php echo $comment->getID(); ?> " style="display: none;"> <?php echo image_tag('spinning_16.gif', array('class' => 'spinning')); ?> </div> <div id="comment_reply_controls_<?php echo $comment->getID(); ?> " class="comment_controls"> <?php echo __('%post_reply or %cancel', array('%post_reply' => '<input type="submit" class="comment_replysave button button-silver" value="' . __('Post reply') . '" />', '%cancel' => javascript_link_tag(__('cancel'), array('onclick' => "\$('comment_reply_{$comment->getID()}').hide();\$('comment_view_{$comment->getID()}').show();"))));
?> </option> <option value="0"<?php if (!$comment->isPublic()) { ?> selected="selected" <?php } ?> ><?php echo __('Visible for me, developers and administrators only'); ?> </option> </select> <br /> <?php include_template('main/textarea', array('area_name' => 'comment_body', 'target_type' => $comment->getTargetType(), 'target_id' => $comment->getTargetId(), 'area_id' => 'comment_reply_' . $comment->getID() . '_bodybox', 'height' => '200px', 'width' => '100%', 'syntax' => $comment->getSyntax(), 'value' => tbg_decodeUTF8("\n\n\n'''" . __('%user wrote:', array('%user' => $comment->getPostedBy()->getName())) . "'''\n>" . str_replace("\n", "\n>", wordwrap(html_entity_decode(strip_tags($comment->getParsedContent($options)), ENT_COMPAT, TBGContext::getI18n()->getCharset()), 75, "\n")) . "\n", true))); ?> <div id="comment_reply_indicator_<?php echo $comment->getID(); ?> " style="display: none;"> <?php echo image_tag('spinning_16.gif', array('class' => 'spinning')); ?> </div> <div id="comment_reply_controls_<?php echo $comment->getID(); ?> " class="comment_controls"> <?php echo __('%post_reply or %cancel', array('%post_reply' => '<input type="submit" class="comment_replysave" value="' . __('Post reply') . '" />', '%cancel' => javascript_link_tag(__('cancel'), array('onclick' => "\$('comment_reply_{$comment->getID()}').hide();\$('comment_view_{$comment->getID()}').show();"))));