"Fossies" - the Fresh Open Source Software Archive

Member "PURELIB/trac/admin/templates/admin_plugins.html" (27 Aug 2019, 10745 Bytes) of package /windows/misc/Trac-1.4.win-amd64.exe:


The requested HTML page contains a <FORM> tag that is unusable on "Fossies" in "automatic" (rendered) mode so that page is shown as HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {# Copyright (C) 2006-2014 Edgewall Software
    2 
    3   This software is licensed as described in the file COPYING, which
    4   you should have received as part of this distribution. The terms
    5   are also available at https://trac.edgewall.org/wiki/TracLicense.
    6 
    7   This software consists of voluntary contributions made by many
    8   individuals. For the exact contribution history, see the revision
    9   history and logs, available at https://trac.edgewall.org/.
   10 #}
   11 # extends 'admin.html'
   12 <!DOCTYPE html>
   13 <html>
   14   <head>
   15     <title>
   16       # block admintitle
   17       ${_("Plugins")}
   18       # endblock admintitle
   19     </title>
   20     # block head
   21     ${ super() }
   22     <script>
   23       jQuery(function($) {
   24         // Sets state of group toggler when component checkboxes are clicked
   25         function setGroupTogglerState() {
   26           var table = $(this).closest("table.listing");
   27           var checkboxes = $("td.sel input:checkbox:enabled", table);
   28           var num_selected = checkboxes.filter(":checked").length;
   29           var none_selected = num_selected === 0;
   30           var all_selected = num_selected === checkboxes.length;
   31           $("th.sel input:checkbox", table)
   32             .prop({"checked": all_selected,
   33                    "indeterminate": !(none_selected || all_selected)});
   34         }
   35         // Add group event behavior for controlling state of toggler
   36         $("table.listing td.sel input:checkbox:enabled")
   37           .click(setGroupTogglerState);
   38         // Add click behavior for the group toggler and initialize its state
   39         $("table.listing th.sel").wrapInner('<label></label>').children()
   40           .each(function() {
   41             $('<input type="checkbox"/>').click(function() {
   42               $("td.sel input:checkbox:enabled",
   43                 $(this).closest("table.listing")).prop("checked", this.checked);
   44             }).prependTo(this).each(setGroupTogglerState);
   45           });
   46         $("h3.foldable").enableFolding(true, true);
   47         $("p.foldable").enableFolding(true, false);
   48         $("thead .trac-toggler a").each(function() {
   49           $(this).attr("href", "").click(function() {
   50             var td = $(this).closest("table").find("tbody td");
   51             var a = td.find(".trac-toggler a");
   52             if ($(this).text() == "+") {
   53               td.removeClass("collapsed");
   54               a.text("&ndash;");
   55             } else {
   56               td.addClass("collapsed");
   57               a.text("+");
   58             }
   59             return false;
   60           });
   61         });
   62       });
   63     </script>
   64     # endblock head
   65   </head>
   66 
   67   <body>
   68     # block adminpanel
   69     <h2>
   70       # set nb_plugins
   71       <span class="trac-count">(${len(plugins)})</span>
   72       # endset
   73       # trans nb_plugins
   74 
   75       Manage Plugins ${nb_plugins}
   76 
   77       # endtrans
   78     </h2>
   79 
   80     <div>
   81       <form id="addplug" class="addnew" method="post" enctype="multipart/form-data" action="#">
   82         ${jmacros.form_token_input()}
   83         <fieldset>
   84           <legend>${_("Install Plugin:")}</legend>
   85           <div class="field">
   86             <label>
   87               ${_("File:")} <input type="file" name="plugin_file" class="trac-disable-determinant"
   88                                ${{'disabled': readonly}|htmlattr} />
   89             </label>
   90           </div>
   91           <div class="buttons">
   92             <input type="submit" name="install" class="trac-disable trac-disable-on-submit"
   93                    value="${_('Install')}"${{'disabled': readonly}|htmlattr} />
   94           </div>
   95           <p class="help">
   96             # if readonly:
   97             #   trans
   98 
   99             The web server does not have sufficient permissions to
  100             store files in the environment plugins directory.
  101 
  102             #   endtrans
  103             # else:
  104             #   trans
  105 
  106             Upload a plugin packaged as Python egg.
  107 
  108             #   endtrans
  109             # endif
  110           </p>
  111         </fieldset>
  112       </form>
  113 
  114       #   for plugin in plugins:
  115       <form id="edit-plugin-${plugin.name.lower()}" method="post" action="#">
  116         ${jmacros.form_token_input()}
  117         <div class="plugin" id="trac-plugin-${plugin.name}">
  118           <h3 class="foldable">${plugin.name} ${plugin.version}</h3>
  119           <!--! FIXME: Plugin uninstall disabled as it is unreliable (#3545)
  120           <div class="uninstall buttons">
  121             <input type="hidden" name="plugin_filename"
  122                    value="${plugin.plugin_filename}" />
  123             <input type="submit" name="uninstall" value="${_('Uninstall')}"
  124                    ${{'disabled': readonly}|htmlattr} />
  125           </div> -->
  126           # if plugin.info:
  127           <p class="summary">${plugin.info.get('summary')}</p>
  128           #   if 'home_page' in plugin.info or 'author' in plugin.info or 'author_email' in plugin.info:
  129           <dl class="info">
  130             #   if 'author' in plugin.info or 'author_email' in plugin.info:
  131             <dt>${_("Author:")}</dt>
  132             <dd>
  133               #   if plugin.info.get('author_email'):
  134               <a href="mailto:${plugin.info.author_email}">
  135                 ${plugin.info.author or plugin.info.author_email}
  136               </a>
  137               #   else:
  138               ${plugin.info.author or plugin.info.author_email}
  139               #   endif
  140             </dd>
  141             #   endif
  142             #   if 'maintainer' in plugin.info or 'maintainer_email' in plugin.info:
  143             <dt>${_("Maintainer:")}</dt>
  144             <dd>
  145               #   if plugin.info.get('maintainer_email'):
  146               <a href="mailto:${plugin.info.maintainer_email}">
  147                 ${plugin.info.maintainer or plugin.info.maintainer_email}
  148               </a>
  149               #   else:
  150               ${plugin.info.maintainer or plugin.info.maintainer_email}
  151               #   endif
  152             </dd>
  153             #   endif
  154             #   if plugin.info.get('home_page'):
  155             <dt>${_("Home page:")}</dt>
  156             <dd>
  157               <a onclick="window.open(this.href); return false"
  158                  href="${plugin.info.home_page}">${plugin.info.home_page}</a>
  159             </dd>
  160             #   endif
  161             #   if plugin.info.get('license'):
  162             <dt>${_("License:")}</dt>
  163             <dd>${plugin.info.license}</dd>
  164             #   endif
  165           </dl>
  166           #   endif
  167           # endif
  168           <table class="listing">
  169             <thead>
  170               <tr>
  171                 <th>
  172                   ${_("Component")}
  173                   <span class="trac-toggler">
  174                     [<a title="${_('Show all descriptions')}"
  175                         href="${href.admin('general', 'plugin', show=plugin.name)
  176                                 + '#trac-plugin-' + plugin.name}">+</a>]
  177                     [<a title="${_('Hide all descriptions')}"
  178                         href="${href.admin('general', 'plugin')
  179                                 + '#trac-plugin-' + plugin.name}">&ndash;</a>]
  180                   </span>
  181                 </th>
  182                 <th class="sel">${_("Enabled")}</th>
  183               </tr>
  184             </thead>
  185             # for module_name, module in plugin.modules|dictsort:
  186             <tbody>
  187               <tr>
  188                 # set show_doc = show == plugin.name or show == module_name
  189                 <td id="trac-mod-${module_name}"
  190                     class="trac-module${' collapsed' if not show_doc and module.description}">
  191                   <p class="trac-heading${' foldable' if module.description}">
  192                     # if module.description:
  193                     <a class="trac-name"
  194                        href="${href.admin('general', 'plugin', show=module_name if not show_doc else none)
  195                              + '#trac-mod-' + module_name}">${module_name}.*</a>
  196                     # else:
  197                     <span class="trac-name">${module_name}.*</span>
  198                     # endif
  199                     # if module.summary:
  200                     <span class="trac-summary"> &mdash; ${module.summary}</span>
  201                     # endif
  202                   </p>
  203                   # if module.description:
  204                   <div>${safe_wiki_to_html(context, module.description)}</div>
  205                   # endif
  206                 </td>
  207                 <td class="sel trac-module"></td>
  208               </tr>
  209               # for component_name, component in module.components|dictsort:
  210               <tr>
  211                 # set show_doc = show == plugin.name or show == component.full_name
  212                 <td id="trac-comp-${component.full_name}"
  213                     class="trac-component${' collapsed' if not show_doc}">
  214                   <p class="trac-heading${' foldable' if component.description}">
  215                     # if component.description:
  216                     <a class="trac-name"
  217                        href="${href.admin('general', 'plugin', show=component.full_name if not show_doc else none)
  218                              + '#trac-comp-' + component.full_name}">${component_name}</a>
  219                     # else:
  220                     <span class="trac-name">${component_name}</span>
  221                     # endif
  222                     # if component.summary:
  223                     <span class="trac-summary"> &mdash; ${component.summary}</span>
  224                     # endif
  225                   </p>
  226                   # if component.description:
  227                   <div>${safe_wiki_to_html(context, component.description)}</div>
  228                   # endif
  229                 </td>
  230                 <td class="sel trac-component">
  231                   # if not component.required:
  232                   <input type="hidden" name="component"
  233                          value="${module_name}.${component_name}" />
  234                   # endif
  235                   <input type="checkbox" name="enable"
  236                          value="${module_name}.${component_name}"
  237                      ${{'checked': component.enabled,
  238                         'disabled': component.required}|htmlattr} />
  239                 </td>
  240               </tr>
  241               # endfor
  242             </tbody>
  243             # endfor
  244           </table>
  245           <div class="buttons">
  246             <input type="hidden" name="plugin" value="${loop.index0}" />
  247             <input type="submit" name="update" value="${_('Apply changes')}" />
  248           </div>
  249         </div>
  250       </form>
  251       #   endfor
  252 
  253       #   call(note, page) jmacros.wikihelp('TracPlugins'):
  254       #     trans note, page
  255 
  256       ${note} See ${page} for help on using plugins.
  257 
  258       #     endtrans
  259       #   endcall
  260     </div>
  261     # endblock adminpanel
  262   </body>
  263 
  264 </html>