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

📄 quips.html.tmpl

📁 bugzilla的安装文件
💻 TMPL
字号:
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({    METADATA => {        'modtime' => '1118309482',        'name' => 'list/quips.html.tmpl',    },    BLOCK => sub {        my $context = shift || die "template sub called without context\n";        my $stash   = $context->stash;        my $output  = '';        my $error;                eval { BLOCK: {    $output .=  "\n";    $output .=  "\n\n";    $output .=  "\n";    #line 31 "template\en\default\list\quips.html.tmpl"    $output .=  $context->process('global/variables.none.tmpl');    $output .=  "\n";    #line 0 "template\en\default\list\quips.html.tmpl"    $output .=  $context->process('global/header.html.tmpl', { 'title' => ($stash->get(['terms', 0, 'Bugzilla', 0]) . " Quip System"), 'h1' => 'Add your own clever headline' });    $output .=  "\n";    #line 52 "template\en\default\list\quips.html.tmpl"    if ($stash->get('added_quip')) {    $output .=  "\n  <p>\n    <font color=\"red\">\n      Your quip '<tt>";    #line 43 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('html')                  || $context->throw($context->error);        $output .=  $stash->get('added_quip');                &$filter($output);    };        $output .=  "</tt>' has been added.";    #line 48 "template\en\default\list\quips.html.tmpl"    if ($stash->get(['Param', [ 'enablequips' ]]) eq 'approved' && ! $stash->get(['user', 0, 'groups', 0, 'admin', 0])) {    $output .=  "\n        It will be used as soon as it gets approved.";    }        $output .=  "\n    </font>\n  </p>";    }        $output .=  "\n";    #line 62 "template\en\default\list\quips.html.tmpl"    if ($stash->get('deleted_quip')) {    $output .=  "\n  <p>\n    <font color=\"red\">\n      The quip '<tt>";    #line 58 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('html')                  || $context->throw($context->error);        $output .=  $stash->get('deleted_quip');                &$filter($output);    };        $output .=  "</tt>' has been deleted.\n    </font>\n  </p>";    }        $output .=  "\n";    #line 68 "template\en\default\list\quips.html.tmpl"    if ($stash->get('approved') || $stash->get('unapproved')) {    $output .=  "\n  <p>";    #line 66 "template\en\default\list\quips.html.tmpl"    $output .=  $stash->get(['approved', 0, 'size', 0]);    $output .=  " quips approved and ";    #line 66 "template\en\default\list\quips.html.tmpl"    $output .=  $stash->get(['unapproved', 0, 'size', 0]);    $output .=  " quips unapproved</p>";    }        $output .=  "\n\n<p>";    #line 72 "template\en\default\list\quips.html.tmpl"    $output .=  $stash->get(['terms', 0, 'Bugzilla', 0]);    $output .=  " will pick a random quip for the headline on each ";    #line 72 "template\en\default\list\quips.html.tmpl"    $output .=  $stash->get(['terms', 0, 'bug', 0]);    $output .=  " list, and\n  you can extend the quip list. Type in something clever or funny or boring\n  (but not obscene or offensive, please) and bonk on the button.";    #line 79 "template\en\default\list\quips.html.tmpl"    if ($stash->get(['Param', [ 'enablequips' ]]) eq 'approved' && ! $stash->get(['user', 0, 'groups', 0, 'admin', 0])) {    $output .=  "\n    Note that your quip has to be approved before it is used.";    }        $output .=  "\n</p>\n\n<form method=\"post\" action=\"quips.cgi\">\n  <input type=\"hidden\" name=\"action\" value=\"add\">\n  <input size=\"80\" name=\"quip\">\n  <p>\n    <input type=\"submit\" value=\"Add This Quip\">\n  </p>\n</form>\n";    #line 174 "template\en\default\list\quips.html.tmpl"    if ($stash->get('show_quips')) {    #line 162 "template\en\default\list\quips.html.tmpl"    if (! $stash->get(['UserInGroup', [ 'admin' ]])) {    $output .=  "\n    <h2>\n      Existing quips:\n    </h2>\n    <ul>";    #line 100 "template\en\default\list\quips.html.tmpl"        # FOREACH     do {        my ($value, $error, $oldloop);        my $list = $stash->get('quipids');                unless (UNIVERSAL::isa($list, 'Template::Iterator')) {            $list = Template::Config->iterator($list)                || die $Template::Config::ERROR, "\n";         }            ($value, $error) = $list->get_first();        eval { $oldloop = $stash->get('loop') };        $stash->set('loop', $list);        eval {    LOOP:   while (! $error) {                $stash->{'quipid'} = $value;    #line 97 "template\en\default\list\quips.html.tmpl"    if (! $stash->get(['quips', 0, $stash->get('quipid'), 0, 'approved', 0])) {    ($value, $error) = $list->get_next();    next LOOP;        }        $output .=  "\n        <li>";    #line 98 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('html')                  || $context->throw($context->error);        $output .=  $stash->get(['quips', 0, $stash->get('quipid'), 0, 'quip', 0]);                &$filter($output);    };        $output .=  "</li>";;                ($value, $error) = $list->get_next();            }        };        $stash->set('loop', $oldloop);        die $@ if $@;        $error = 0 if $error && $error eq Template::Constants::STATUS_DONE;        die $error if $error;    };        $output .=  "\n    </ul>";    }    else {    $output .=  "\n    <h2>Edit existing quips:</h2>\n    <p>\n      <strong>Note:</strong> Only approved quips will be shown.\n      If enablequips is set to <q>on</q>, entered quips are automatically\n      approved.\n    </p>\n    <form name=\"editform\" method=\"post\" action=\"quips.cgi\">\n      <input type=\"hidden\" name=\"action\" value=\"approve\">\n      <table border=\"1\">\n        <thead><tr>\n          <th>Quip</th>\n          <th>Author</th>\n          <th>Action</th>\n          <th>Approved</th>\n        </tr></thead><tbody>";    #line 140 "template\en\default\list\quips.html.tmpl"        # FOREACH     do {        my ($value, $error, $oldloop);        my $list = $stash->get('quipids');                unless (UNIVERSAL::isa($list, 'Template::Iterator')) {            $list = Template::Config->iterator($list)                || die $Template::Config::ERROR, "\n";         }            ($value, $error) = $list->get_first();        eval { $oldloop = $stash->get('loop') };        $stash->set('loop', $list);        eval {    LOOP:   while (! $error) {                $stash->{'quipid'} = $value;    $output .=  "\n          <tr>\n            <td>";    #line 122 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('html')                  || $context->throw($context->error);        $output .=  $stash->get(['quips', 0, $stash->get('quipid'), 0, 'quip', 0]);                &$filter($output);    };        $output .=  "</td>\n            <td>";    #line 125 "template\en\default\list\quips.html.tmpl"    $stash->set('userid', $stash->get(['quips', 0, $stash->get('quipid'), 0, 'userid', 0]));        #line 125 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('html')                  || $context->throw($context->error);        $output .=  $stash->get(['users', 0, $stash->get('userid'), 0]);                &$filter($output);    };        #line 125 "template\en\default\list\quips.html.tmpl"    if (! $stash->get(['users', 0, $stash->get('userid'), 0])) {    $output .=  'Unknown';    }        $output .=  "\n            </td>\n            <td>\n              <a href=\"quips.cgi?action=delete&amp;quipid=";    #line 128 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('uri')                  || $context->throw($context->error);        $output .=  $stash->get('quipid');                &$filter($output);    };        $output .=  "\">\n                Delete\n              </a>\n            </td>\n            <td>\n              <input type=\"checkbox\" name=\"quipid_";    #line 133 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('uri')                  || $context->throw($context->error);        $output .=  $stash->get('quipid');                &$filter($output);    };        $output .=  "\"\n                     id=\"quipid_";    #line 134 "template\en\default\list\quips.html.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('uri')                  || $context->throw($context->error);        $output .=  $stash->get('quipid');                &$filter($output);    };        $output .=  "\"";    #line 136 "template\en\default\list\quips.html.tmpl"    if ($stash->get(['quips', 0, $stash->get('quipid'), 0, 'approved', 0])) {    $output .=  ' checked="checked"';    }        $output .=  ">\n            </td>\n          </tr>";;                ($value, $error) = $list->get_next();            }        };        $stash->set('loop', $oldloop);        die $@ if $@;        $error = 0 if $error && $error eq Template::Constants::STATUS_DONE;        die $error if $error;    };        $output .=  "\n        </tbody>\n      </table>\n      <script type=\"text/javascript\" language=\"JavaScript\"><!--\n        var numelements = document.forms.editform.elements.length;\n        function SetCheckboxes(value) {\n          var item;\n          for (var i=0 ; i<numelements ; i++) {\n            item = document.forms.editform.elements[i];\n            item.checked = value;\n          }\n        }\n        document.write(' <input type=\"button\" name=\"uncheck_all\" '\n                      +'value=\"Uncheck All\" onclick=\"SetCheckboxes(false);\">');\n        document.write(' <input type=\"button\" name=\"check_all\" '\n                      +'value=\"Check All\" onclick=\"SetCheckboxes(true);\">');\n        //--></script>\n\n      <input type=\"submit\" value=\"Update\">\n    </form>\n    <br>";    }        }    else {    $output .=  "\n  <p>\n    Those who like their wisdom in large doses can\n    <a href=\"quips.cgi?action=show\">view";    #line 170 "template\en\default\list\quips.html.tmpl"    if ($stash->get(['UserInGroup', [ 'admin' ]])) {    $output .=  "\n      and edit";    }        $output .=  "\n    the whole quip list</a>.\n  </p>";    }        $output .=  "\n";    #line 177 "template\en\default\list\quips.html.tmpl"    $output .=  $context->process('global/footer.html.tmpl');    $output .=  "\n";        } };        if ($@) {            $error = $context->catch($@, \$output);            die $error unless $error->type eq 'return';        }            return $output;    },    DEFBLOCKS => {    },});

⌨️ 快捷键说明

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