Merge branch 'MDL-54119-master-with_progress_bar_template' of git://github.com/junpat...
authorDavid Monllao <davidm@moodle.com>
Wed, 18 May 2016 03:33:04 +0000 (11:33 +0800)
committerDavid Monllao <davidm@moodle.com>
Wed, 18 May 2016 03:33:04 +0000 (11:33 +0800)
1  2 
admin/tool/lp/styles.css
admin/tool/lp/templates/plan_page.mustache

diff --combined admin/tool/lp/styles.css
@@@ -6,13 -6,14 +6,14 @@@
  }
  .path-admin-tool-lp .progresstext {
      display: inline-block;
-     height: 40px;
      vertical-align: top;
  }
  .path-admin-tool-lp .progress {
      width: 100%;
      display: inline-block;
-     margin-right: 2em;
+ }
+ .path-admin-tool-lp .progress .bar {
+     min-width: 3em;
  }
  .dir-rtl.path-admin-tool-lp .progress .bar {
      float: right;
@@@ -220,10 -221,6 +221,10 @@@ input[type="checkbox"].tool_lp_scale_pr
  .user-competency-course-navigation {
      width: 240px;
  }
 +.user-competency-course-navigation span {
 +    max-width: 100%;
 +    overflow: hidden;
 +}
  
  /** Competency grader */
  .competency-grader textarea {
              {{/description}}
              <dt>{{#str}}progress, tool_lp{{/str}}</dt>
              <dd>
-                 <div class="span4">
-                     <div class="progresstext">
-                         {{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
-                     </div>
-                 </div>
-                 <div class="span4">
-                     <span class="pull-right label label-info">{{proficientcompetencypercentageformatted}} %</span>
-                     <div class="progress">
-                         <div class="bar" style="width: {{proficientcompetencypercentage}}%;"></div>
-                     </div>
-                 </div>
+             {{< tool_lp/progress_bar}}
+                 {{$progresstext}}
+                     {{#str}}xcompetenciesproficientoutofy, tool_lp, { "x": "{{proficientcompetencycount}}", "y": "{{competencycount}}" }{{/str}}
+                 {{/progresstext}}
+                 {{$percentage}}{{proficientcompetencypercentage}}{{/percentage}}
+                 {{$percentlabel}}{{proficientcompetencypercentageformatted}}&nbsp;%{{/percentlabel}}
+             {{/tool_lp/progress_bar}}
              </dd>
          </dl>
      </div>
                  {{/competencies}}
              </tbody>
          </table>
 +        {{^competencies}}
 +            <p class="alert alert-info">
 +                {{#str}}nocompetenciesinlearningplan, tool_lp{{/str}}
 +            </p>
 +        {{/competencies}}
      </div>
  </div>
  {{#js}}