⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comments.html.tmpl

📁 buzilla软件
💻 TMPL
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.20#------------------------------------------------------------------------Template::Document->new({    METADATA => {        'modtime' => '1202512834',        'name' => 'bug/comments.html.tmpl',    },    BLOCK => sub {        my $context = shift || die "template sub called without context\n";        my $stash   = $context->stash;        my $output  = '';        my $_tt_error;                eval { BLOCK: {    $output .=  "\n";    $output .=  "\n";    #line 24 "template\en\default\bug\comments.html.tmpl"    $output .=  $context->process('bug/time.html.tmpl');    $output .=  "\n\n  <script type=\"text/javascript\">\n  <!--\n  function updateCommentPrivacy(checkbox, id) {\n    var comment_elem = document.getElementById('comment_text_'+id).parentNode;\n    if (checkbox.checked) {\n      if (!comment_elem.className.match('bz_private')) {\n        comment_elem.className = comment_elem.className.concat(' bz_private');\n      }\n    }\n    else {\n      comment_elem.className =\n        comment_elem.className.replace(/(\\s*|^)bz_private(\\s*|\$)/, '\$2');\n    }\n  }\n  //-->\n  </script>\n\n";    #line 44 "template\en\default\bug\comments.html.tmpl"    $stash->set('start_at', 0, 1);    $stash->set('mode', 'show', 1);        #line 45 "template\en\default\bug\comments.html.tmpl"    $stash->set('isinsider', $stash->get(['Param', [ 'insidergroup' ]]) && $stash->get(['user', 0, 'in_group', [ $stash->get(['Param', [ 'insidergroup' ]]) ]]));        #line 46 "template\en\default\bug\comments.html.tmpl"    $stash->set('sort_order', $stash->get(['user', 0, 'settings', 0, 'comment_sort_order', 0, 'value', 0]));        $output .=  "\n\n";    #line 53 "template\en\default\bug\comments.html.tmpl"    if (($stash->get('start_at') > 0)) {    #line 52 "template\en\default\bug\comments.html.tmpl"    $stash->set('sort_order', 'oldest_to_newest');        }        $output .=  "\n\n\n";    #line 70 "template\en\default\bug\comments.html.tmpl"    if ($stash->get('sort_order') eq 'oldest_to_newest') {    #line 58 "template\en\default\bug\comments.html.tmpl"    $stash->set('count', 0);        #line 59 "template\en\default\bug\comments.html.tmpl"    $stash->set('description', 0);        #line 60 "template\en\default\bug\comments.html.tmpl"    $stash->set('increment', 1);        }    else {    #line 62 "template\en\default\bug\comments.html.tmpl"    $stash->set('increment', -1);        #line 69 "template\en\default\bug\comments.html.tmpl"    if ($stash->get('sort_order') eq 'newest_to_oldest') {    #line 64 "template\en\default\bug\comments.html.tmpl"    $stash->set('count', $stash->get(['comments', 0, 'size', 0]) - 1);        #line 65 "template\en\default\bug\comments.html.tmpl"    $stash->set('description', 0);        }    elsif ($stash->get('sort_order') eq 'newest_to_oldest_desc_first') {    #line 67 "template\en\default\bug\comments.html.tmpl"    $stash->set('count', $stash->get(['comments', 0, 'size', 0]));        #line 68 "template\en\default\bug\comments.html.tmpl"    $stash->set('description', $stash->get(['comments', 0, 'size', 0]));        }        }        $output .=  "\n\n";    #line 79 "template\en\default\bug\comments.html.tmpl"        # FOREACH     do {        my ($_tt_value, $_tt_error, $_tt_oldloop);        my $_tt_list = $stash->get('comments');                unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) {            $_tt_list = Template::Config->iterator($_tt_list)                || die $Template::Config::ERROR, "\n";         }            ($_tt_value, $_tt_error) = $_tt_list->get_first();        eval { $_tt_oldloop = $stash->get('loop') };        $stash->set('loop', $_tt_list);        eval {    LOOP:   while (! $_tt_error) {                $stash->{'comment'} = $_tt_value;    #line 76 "template\en\default\bug\comments.html.tmpl"    if ($stash->get('count') >= $stash->get('start_at')) {    #line 75 "template\en\default\bug\comments.html.tmpl"    $output .=  $context->process('a_comment');    }        $output .=  "\n  ";    #line 78 "template\en\default\bug\comments.html.tmpl"    $stash->set('count', $stash->get('count') + $stash->get('increment'));    ;                ($_tt_value, $_tt_error) = $_tt_list->get_next();            }        };        $stash->set('loop', $_tt_oldloop);        die $@ if $@;        $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE;        die $_tt_error if $_tt_error;    };        $output .=  "\n\n";    $output .=  "  ";    #line 84 "template\en\default\bug\comments.html.tmpl"    $output .=  $stash->get(['Hook', 0, 'process', [ 'aftercomments' ]]);    $output .=  "\n\n";    $output .=  "\n";    $output .=  "\n";    $output .=  "\n";        $output .=  "\n";        } };        if ($@) {            $_tt_error = $context->catch($@, \$output);            die $_tt_error unless $_tt_error->type eq 'return';        }            return $output;    },    DEFBLOCKS => {        'a_comment' => sub {            my $context = shift || die "template sub called without context\n";            my $stash   = $context->stash;            my $output  = '';            my $_tt_error;                        eval { BLOCK: {        #line 160 "template\en\default\bug\comments.html.tmpl"        if (! $stash->get(['comment', 0, 'isprivate', 0]) || $stash->get('isinsider')) {        $output .=  "\n    <div class=\"bz_comment";        #line 92 "template\en\default\bug\comments.html.tmpl"        if ($stash->get(['comment', 0, 'isprivate', 0])) {        $output .=  ' bz_private';        }                #line 93 "template\en\default\bug\comments.html.tmpl"        if ($stash->get(['marks', 0, $stash->get('count'), 0])) {        $output .=  ' bz_comment_hilite';        }                $output .=  "\">";        #line 126 "template\en\default\bug\comments.html.tmpl"        if ($stash->get('count') eq $stash->get('description')) {        $output .=  "\n        <table>\n          <tr>\n            <th align=\"left\">\n              <b><a name=\"c0\" href=\"show_bug.cgi?id=";        #line 98 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get(['bug', 0, 'bug_id', 0]);        $output .=  "#c0\">\n                Description</a>:</b>&nbsp;&nbsp;";        #line 104 "template\en\default\bug\comments.html.tmpl"        if ($stash->get('mode') eq 'edit') {        $output .=  "<script type=\"text/javascript\"><!-- \n                    addReplyLink(0);\n                  //--></script>";        }                $output .=  "\n            </th>\n            <td align=\"left\" width=\"30%\">\n              <b>Opened:</b> ";        #line 107 "template\en\default\bug\comments.html.tmpl"                # FILTER        $output .=  do {            my $output = '';            my $_tt_filter = $context->filter('time')                      || $context->throw($context->error);                $output .=  $stash->get(['bug', 0, 'creation_ts', 0]);                        &$_tt_filter($output);        };                $output .=  "\n            </td>\n          </tr>\n        </table>";        }        else {        $output .=  "\n        <span class=\"bz_comment_head\">\n          <span class=\"comment_rule\">-------</span> <i>Comment\n          <a name=\"c";        #line 114 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\" href=\"show_bug.cgi?id=";        #line 114 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get(['bug', 0, 'bug_id', 0]);        $output .=  "#c";        #line 114 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\">\n            #";        #line 115 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "</a> From \n          <a href=\"mailto:";        #line 116 "template\en\default\bug\comments.html.tmpl"                # FILTER        $output .=  do {            my $output = '';            my $_tt_filter = $context->filter('html')                      || $context->throw($context->error);                $output .=  $stash->get(['comment', 0, 'email', 0]);                        &$_tt_filter($output);        };                $output .=  "\">";        #line 117 "template\en\default\bug\comments.html.tmpl"                # FILTER        $output .=  do {            my $output = '';            my $_tt_filter = $context->filter('html')                      || $context->throw($context->error);                $output .=  $stash->get(['comment', 0, 'name', 0]);                        &$_tt_filter($output);        };                $output .=  "</a>\n          ";        #line 118 "template\en\default\bug\comments.html.tmpl"                # FILTER        $output .=  do {            my $output = '';            my $_tt_filter = $context->filter('time')                      || $context->throw($context->error);                $output .=  $stash->get(['comment', 0, 'time', 0]);                        &$_tt_filter($output);        };                $output .=  " \n          </i>";        #line 123 "template\en\default\bug\comments.html.tmpl"        if ($stash->get('mode') eq 'edit') {        $output .=  "\n          <script type=\"text/javascript\"><!-- \n            addReplyLink(";        #line 122 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "); //--></script>";        }                $output .=  "\n          <span class=\"comment_rule\">-------</span>\n        </span>";        }                $output .=  "\n        ";        #line 139 "template\en\default\bug\comments.html.tmpl"        if ($stash->get('mode') eq 'edit' && $stash->get('isinsider')) {        $output .=  "\n        <i>\n          <input type=\"hidden\" name=\"oisprivate-";        #line 130 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\" \n                 value=\"";        #line 131 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get(['comment', 0, 'isprivate', 0]);        $output .=  "\">\n          <input type=\"hidden\" name=\"when-";        #line 132 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\" value=\"";        #line 132 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get(['comment', 0, 'time', 0]);        $output .=  "\">\n          <input type=\"checkbox\" name=\"isprivate-";        #line 133 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\" value=\"1\"\n                 onClick=\"updateCommentPrivacy(this, ";        #line 134 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  ")\"\n                 id=\"isprivate-";        #line 135 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\"";        #line 136 "template\en\default\bug\comments.html.tmpl"        if ($stash->get(['comment', 0, 'isprivate', 0])) {        $output .=  ('' . " checked=\"checked\"");        }                $output .=  ">\n          <label for=\"isprivate-";        #line 137 "template\en\default\bug\comments.html.tmpl"        $output .=  $stash->get('count');        $output .=  "\">Private</label>\n        </i>";        }                #line 145 "template\en\default\bug\comments.html.tmpl"        if ($stash->get(['user', 0, 'in_group', [ $stash->get(['Param', [ 'timetrackinggroup' ]]) ]]) && ($stash->get(['comment', 0, 'work_time', 0]) > 0 || $stash->get(['comment', 0, 'work_time', 0]) < 0)) {        $output .=  "\n         <br>\n         Additional hours worked: ";        #line 144 "template\en\default\bug\comments.html.tmpl"        $output .=  $context->process('formattimeunit', { 'time_unit' => $stash->get(['comment', 0, 'work_time', 0]) });        }                $output .=  "\n\n";        #line 154 "template\en\default\bug\comments.html.tmpl"        if ($stash->get(['comment', 0, 'already_wrapped', 0])) {        #line 151 "template\en\default\bug\comments.html.tmpl"        $stash->set('wrapped_comment', $stash->get(['comment', 0, 'body', 0]));                }        else {        #line 153 "template\en\default\bug\comments.html.tmpl"                # CAPTURE        $stash->set('wrapped_comment', do {            my $output = '';                # FILTER        $output .=  do {            my $output = '';            my $_tt_filter = $context->filter('wrap_comment')                      || $context->throw($context->error);                $output .=  $stash->get(['comment', 0, 'body', 0]);                        &$_tt_filter($output);        };                    $output;        });                }                $output .=  "\n<pre class=\"bz_comment_text\" ";        #line 156 "template\en\default\bug\comments.html.tmpl"        if ($stash->get('mode') eq 'edit') {        $output .=  ' id="comment_text_'  . $stash->get('count')  . '"';        }                $output .=  ">";        #line 157 "template\en\default\bug\comments.html.tmpl"                # FILTER        $output .=  do {            my $output = '';            my $_tt_filter = $context->filter('quoteUrls', [ $stash->get(['bug', 0, 'bug_id', 0]) ])                      || $context->throw($context->error);                $output .=  $stash->get('wrapped_comment');                        &$_tt_filter($output);        };                $output .=  "</pre>\n    </div>";        }                    } };            if ($@) {                $_tt_error = $context->catch($@, \$output);                die $_tt_error unless $_tt_error->type eq 'return';            }                    return $output;        },    },});

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -