apollodec/Apollo/assets/views/courseDetails.html
2017-11-23 19:52:01 +05:30

241 lines
13 KiB
HTML

<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #007AFF;
padding: 0.5em 0.6em;
}
</style>
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="Add/View Course Details">{{ mainTitle }}</h1>
<!--
<span class="mainDescription">Over a dozen reusable components built to provide popovers, media objects, navigation, tooltips and much more. </span>
-->
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white">
<div class="row" ng-controller="courseCtrl" data-ng-init="init()">
<tabset class="tabbable">
<tab heading="View Course" id="viewcourse">
<div class="container-fluid container-fullw">
<div class="row">
<div ng-if="loader == ''" class="col-md-12" align="center">
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
</spinner>
</div>
<div class="col-md-12" ng-if="emptyData == false && loader != ''" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! No
records found... </h3></strong></p>
</div>
<div class="col-md-12" ng-if="emptyData == true">
<div class="row">
<div class="col-md-3">
<script>
$(function () {
$("#search").focus();
});
</script>
<input class="form-control" type="text" ng-model="search"
id="search" autofocus tabindex="1"
placeholder="Search"/><br><br>
</div>
</div>
<div class="table-responsive">
<fieldset>
<table class="table table-hover">
<thead>
<tr>
<th ng-click="sort('CourseID')">Course ID
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('CourseName')">Course Name
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('UniversityName')">University
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th></th>
</tr>
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:5">
<tr>
<td>{{p.CourseID}}</td>
<td>{{p.CourseName}}</td>
<td>{{p.UniversityName}}</td>
<td>
<a href="#" class="text-primary" id="editRowBtn{{p.CourseID}}" ng-click="setEditId(p.CourseID);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>
</td>
</tr>
<tr ng-show="editId === p.CourseID" ng-if="editId === p.CourseID" style="width: ">
<td colspan="6" ng-include
src="'assets/views/editCourseDetails.html'"></td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="5" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</fieldset>
</div>
</div>
</div>
</div>
<!--
view tab end
-->
</tab>
<script>
$('#addcourse').click(function () {
$('#course').focus();
});
</script>
<tab heading="Add Course" id="addcourse">
<div>
<form name="Form" id="form" novalidate ng-submit="courseForm.submit(Form, myModel, 'zoom-in')" method="post">
<div class="row">
<div class="col-md-12">
<fieldset>
<legend>
Add New Course Details
</legend>
<div class="row">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.coursecode.$dirty && Form.coursecode.$invalid, 'has-success':Form.coursecode.$valid}">
<label>
Course ID <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Course ID"
tabindex="1" class="form-control" name="coursecode"
ng-model="myModel.courseCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.required">Course id is required</span>
<span class="error text-small block"
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.pattern">Invalid course id </span>
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.coursename.$dirty && Form.coursename.$invalid, 'has-success':Form.coursename.$valid}">
<label>
Course Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Course Name"
tabindex="2" class="form-control" name="coursename"
ng-model="myModel.courseName" ng-pattern="/^[a-zA-Z-./\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.coursename.$dirty && Form.coursename.$error.required">Course name is required</span>
<span class="error text-small block"
ng-if="Form.coursename.$dirty && Form.coursename.$error.pattern">Invalid course name </span>
<!--<span class="success text-small"-->
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
<label>
University <span class="symbol required"></span>
</label>
<select class="form-control" name="university" tabindex="3" id="university"
ng-model="myModel.universityName"
ng-options="details.UniversityID as details.UniversityName for details in university"
required>
<option value=""> Select University</option>
</select>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
</div>
<div class="col-md-3">
<label>
Active/De-Active
</label>
<div ng-switch="myModel.switchsetting">
<div ng-switch-when="true">
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
</div>
<div ng-switch-when="false">
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = false" class="green"></switch>
</div>
<div ng-switch-default>
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in">
Submit
</button>
<!-- <button type="submit" class="btn btn-success btn-o" tabindex="8">
Submit
</button>-->
<button type="reset" class="btn btn-warning btn-wide" tabindex="10"
ng-click="branchForm.reset(Form)">
Reset
</button>
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>
</tab>
</tabset>
</div>
</div>
<!-- end: LIST GROUP -->