[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/admin/tool/lp/templates/ -> manage_competencies_page.mustache (source)

   1  {{!
   2      This file is part of Moodle - http://moodle.org/
   3  
   4      Moodle is free software: you can redistribute it and/or modify
   5      it under the terms of the GNU General Public License as published by
   6      the Free Software Foundation, either version 3 of the License, or
   7      (at your option) any later version.
   8  
   9      Moodle is distributed in the hope that it will be useful,
  10      but WITHOUT ANY WARRANTY; without even the implied warranty of
  11      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12      GNU General Public License for more details.
  13  
  14      You should have received a copy of the GNU General Public License
  15      along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  }}
  17  {{!
  18      Manage competencies template.
  19  
  20      Classes required for JS:
  21  
  22      Data attibutes required for JS:
  23      * data-action=add
  24      * data-enhance=tree
  25      * data-region=term
  26      * data-region=selected-competency
  27  
  28      Context variables required for this template:
  29      * framework -
  30      * competencies - array of objects containing id, shortname, idnumber, sortorder, parentid, competencyframeworkid, path
  31      * canmanage - true if this user has permission to manage the competencies
  32  }}
  33  <div data-region="managecompetencies">
  34  <h2>
  35      {{{framework.shortname}}}
  36      {{#canmanage}}
  37              <a href="{{pluginbaseurl}}/editcompetencyframework.php?id={{framework.id}}&pagecontextid={{pagecontextid}}&return=competencies">{{#pix}}t/edit, core, {{#str}}editcompetencyframework, tool_lp{{/str}}{{/pix}}</a>
  38      {{/canmanage}}
  39  </h2>
  40  <div>{{{framework.description}}}</div>
  41  <h3>{{#str}}competencies, core_competency{{/str}}</h3>
  42  <div class="row-fluid">
  43  <div class="span6">
  44  <p>
  45  <form data-region="filtercompetencies" data-frameworkid="{{framework.id}}">
  46      <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
  47      <input type="text" id="filter{{uniqid}}" placeholder="{{#str}}search, tool_lp{{/str}}" value="{{search}}">
  48      <button>{{#pix}}a/search, , {{#str}}search{{/str}}{{/pix}}</button>
  49  </form>
  50  </p>
  51  <ul data-enhance="tree">
  52      {{> tool_lp/loading }}
  53  </ul>
  54  </div>
  55  
  56  <div class="span6 well">
  57  <h4 data-region="selected-competency">{{#str}}selectedcompetency, tool_lp{{/str}}</h4>
  58  <p data-region="competencyinfo">
  59  {{#str}}nocompetencyselected, tool_lp{{/str}}
  60  </p>
  61  {{#canmanage}}
  62  <div data-region="competencyactions">
  63  <button class="btn" data-action="add">{{#pix}}t/add{{/pix}} <span data-region="term"></span></button>
  64              <span data-region="competencyactionsmenu">
  65              <ul title="{{#str}}edit{{/str}}" class="competencyactionsmenu">
  66                  <li>
  67                      <a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
  68                      <ul class="dropdown-menu">
  69                          <li>
  70                              <a href="#" data-action="edit">
  71                                  {{#pix}}t/edit{{/pix}} {{#str}}edit{{/str}}
  72                              </a>
  73                          </li>
  74                          <li>
  75                              <a href="#" data-action="move">
  76                                  {{#pix}}t/move{{/pix}} {{#str}}movetonewparent, tool_lp{{/str}}
  77                              </a>
  78                          </li>
  79                          <li>
  80                              <a href="#" data-action="delete">
  81                                  {{#pix}}t/delete{{/pix}} {{#str}}delete{{/str}}
  82                              </a>
  83                          </li>
  84                          <li>
  85                              <a href="#" data-action="moveup">
  86                                  {{#pix}}t/up{{/pix}} {{#str}}moveup{{/str}}
  87                              </a>
  88                          </li>
  89                          <li>
  90                              <a href="#" data-action="movedown">
  91                                  {{#pix}}t/down{{/pix}} {{#str}}movedown{{/str}}
  92                              </a>
  93                          </li>
  94                          <li>
  95                              <a href="#" data-action="linkedcourses">
  96                                  {{#pix}}t/viewdetails{{/pix}} {{#str}}linkedcourses, tool_lp{{/str}}
  97                              </a>
  98                          </li>
  99                          <li>
 100                              <a href="#" data-action="relatedcompetencies">
 101                                  {{#pix}}t/add{{/pix}} {{#str}}addcrossreferencedcompetency, tool_lp{{/str}}
 102                              </a>
 103                          </li>
 104                          <li>
 105                              <a href="#" data-action="competencyrules">
 106                                  {{#pix}}t/edit{{/pix}} {{#str}}competencyrule, tool_lp{{/str}}
 107                              </a>
 108                          </li>
 109                      </ul>
 110                  </li>
 111              </ul>
 112              </span>
 113  </div>
 114  </div>
 115  {{/canmanage}}
 116  </div>
 117  
 118  {{#js}}
 119  // Initialise the JS.
 120  require(['tool_lp/tree', 'tool_lp/competencytree', 'tool_lp/competencyactions', 'jquery'],
 121          function(ariatree, treeModel, actions, $) {
 122  
 123      treeModel.init({{framework.id}},
 124                     {{#quote}} {{{framework.shortname}}} {{/quote}},
 125                     '{{search}}',
 126                     '[data-enhance=tree]',
 127                     {{canmanage}});
 128  
 129      actions.init(treeModel, {{pagecontextid}}, '{{{framework.taxonomies}}}', {{{rulesmodules}}});
 130  
 131  });
 132  {{/js}}
 133  
 134  </div>


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1