 <section class="content-header">
    <h1>
        {{phrase.gradeLevels}}
    </h1>
</section>


<section class="content" ng-show="views.list">
  <a ng-click="changeView('add')" class="floatRTL btn btn-success btn-flat pull-right marginBottom15">{{phrase.addLevel}}</a>  
  <div class="box col-xs-12">
      <div class="box-header">
          <h3 class="box-title">{{phrase.listMarks}}</h3>
          <div class="box-tools">
              <div class="input-group">
                  <input type="text" name="table_search" ng-model="searchText" class="form-control input-sm pull-right" style="width: 150px;" placeholder="{{phrase.Search}}">
                  <div class="input-group-btn">
                      <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
                  </div>
              </div>
          </div>
      </div>
      <div class="box-body table-responsive">
          <table class="table table-hover">
              <tbody><tr>
                  <th>{{phrase.ID}}</th>
                  <th>{{phrase.gradeName}}</th>
                  <th>{{phrase.gradeDesc}}</th>
                  <th>{{phrase.gradePoint}}</th>
                  <th>{{phrase.from}} -> {{phrase.to}}</th>
                  <th>{{phrase.Operations}}</th>
              </tr>
              <tr ng-repeat="level in gradeLevels | filter:searchText">
                  <td>{{level.id}}</td>
                  <td>{{level.gradeName}}</td>
                  <td>{{level.gradeDescription}}</td>
                  <td>{{level.gradePoints}}</td>
                  <td>{{level.gradeFrom}} -> {{level.gradeTo}}</td>
                  <td>
                    <a ng-click="edit(level.id)" type="button" class="btn btn-info btn-flat" title="{{phrase.Edit}}" tooltip><i class="fa fa-pencil"></i></a>
                    <a ng-click="remove(level,$index)" type="button" class="btn btn-danger btn-flat" title="{{phrase.Remove}}" tooltip><i class="fa fa-trash-o"></i></a>
                  </td>
              </tr>
              <tr ng-show="!gradeLevels.length"><td class="noTableData" colspan="6">{{phrase.noGrades}}</td></tr>
          </tbody></table>
      </div>
  </div>
</section>

<section class="content" ng-show="views.add">
  <a ng-click="changeView('list')" class="floatRTL btn btn-danger btn-flat pull-right marginBottom15">{{phrase.cancelAdd}}</a>  
  <div class="box col-xs-12">
    <div class="box-header">
        <h3 class="box-title">{{phrase.addLevel}}</h3>
    </div>
    <div class="box-body table-responsive">
      <form class="form-horizontal" name="addGrade" role="form" ng-submit="saveAdd()" novalidate>
        <div class="form-group" ng-class="{'has-error': addGrade.gradeName.$invalid}">
          <label for="inputEmail3" class="col-sm-2 control-label">{{phrase.gradeName}} * </label>
          <div class="col-sm-10">
            <input type="text" name="gradeName" ng-model="form.gradeName" class="form-control" required placeholder="{{phrase.gradeName}}">
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradeDesc}}</label>
          <div class="col-sm-10">
            <textarea name="gradeDescription" class="form-control" ng-model="form.gradeDescription" placeholder="{{phrase.gradeDesc}}"></textarea>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': addGrade.gradePoints.$invalid}">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradePoint}} *</label>
          <div class="col-sm-10">
            <input type="text" name="gradePoints" ng-model="form.gradePoints" class="form-control" required placeholder="{{phrase.gradePoint}}">
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': addGrade.gradeFrom.$invalid}">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradeFrom}} *</label>
          <div class="col-sm-10">
            <input type="text" name="gradeFrom" ng-model="form.gradeFrom" class="form-control" required placeholder="{{phrase.gradeFrom}}">
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': addGrade.gradeTo.$invalid}">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradeTo}}</label>
          <div class="col-sm-10">
            <input type="text" name="gradeTo" ng-model="form.gradeTo" class="form-control" required placeholder="{{phrase.gradeTo}}">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default" ng-disabled="addGrade.$invalid">{{phrase.addLevel}}</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</section>

<section class="content" ng-show="views.edit">
  <a ng-click="changeView('list')" class="floatRTL btn btn-danger btn-flat pull-right marginBottom15">{{phrase.cancelEdit}}</a> 
  <div class="box col-xs-12">
    <div class="box-header">
        <h3 class="box-title">{{phrase.editGrade}}</h3>
    </div>
    <div class="box-body table-responsive">
      <form class="form-horizontal" name="editGrade" role="form" ng-submit="saveEdit()" novalidate>
        <div class="form-group" ng-class="{'has-error': addGrade.gradeName.$invalid}">
          <label for="inputEmail3" class="col-sm-2 control-label">{{phrase.gradeName}} * </label>
          <div class="col-sm-10">
            <input type="text" name="gradeName" ng-model="form.gradeName" class="form-control" required placeholder="{{phrase.gradeName}}">
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradeDesc}}</label>
          <div class="col-sm-10">
            <textarea name="gradeDescription" class="form-control" ng-model="form.gradeDescription" placeholder="{{phrase.gradeDesc}}"></textarea>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': addGrade.gradePoints.$invalid}">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradePoint}} *</label>
          <div class="col-sm-10">
            <input type="text" name="gradePoints" ng-model="form.gradePoints" class="form-control" required placeholder="{{phrase.gradePoint}}">
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': addGrade.gradeFrom.$invalid}">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradeFrom}} *</label>
          <div class="col-sm-10">
            <input type="text" name="gradeFrom" ng-model="form.gradeFrom" class="form-control" required placeholder="{{phrase.gradeFrom}}">
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': addGrade.gradeTo.$invalid}">
          <label for="inputPassword3" class="col-sm-2 control-label">{{phrase.gradeTo}}</label>
          <div class="col-sm-10">
            <input type="text" name="gradeTo" ng-model="form.gradeTo" class="form-control" required placeholder="{{phrase.gradeTo}}">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default" ng-disabled="editGrade.$invalid">{{phrase.editGrade}}</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</section>