Skip to content

Commit

Permalink
allotment result added, print added
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh04-02 committed Jun 22, 2018
1 parent 68f6182 commit 850b0ce
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 1 deletion.
5 changes: 5 additions & 0 deletions routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
//admin security & backup settings
include_once('views/admin/admin_security.php');
},
'admin/alloted' => function() {
//admin security & backup settings
include_once('views/admin/admin_alloted.php');
},

// Student interface

'student' => function() {
Expand Down
47 changes: 47 additions & 0 deletions views/admin/admin_alloted.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
include_once('views/admin/admin_dashboard.php');
?>

<main class="mdl-layout__content">
<div class="page-content">
<!-- Your content goes here -->

<!-- Wide card with share menu button -->
<div class="mdl-grid">

<div class="mdl-cell mdl-cell--12-col">

<div class="demo-card-wide1 mdl-card mdl-shadow--2dp">
<div class="mdl-card__title">
<h2 id="tt1" class="mdl-card__title-text"><b>Allotment Result</b></h2>
</div>


<div class="mdl-card__actions mdl-card--border"></div>

<div class="table-responsive">
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent mdl-js-ripple-effect">Print Allotment Result</button><br><br>
<table id="result" class="mdl-data-table mdl-js-data-table">
<thead>
<tr>
<th class="mdl-data-table__cell--non-numeric">Roll no.</th>
<th class="mdl-data-table__cell--non-numeric">Alloted Elective</th>
</tr>
</thead>
<tbody>
<?php Database::Allotmentresult(); ?>
</tbody>
</table>
</div>
<script>
function printData() {
var divToPrint = document.getElementById('result');
newWin = window.open("");
newWin.document.write(divToPrint.outerHTML);
newWin.print();
newWin.close();
}
</script>

</div>
</div>
1 change: 1 addition & 0 deletions views/admin/admin_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
?>
<br><br>
<button class="mdl-button mdl-js-button mdl-button--green mdl-button--raised mdl-js-ripple-effect">Ready for Allotment?</button>
<a class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" href="/admin/alloted">View Allotment Result</a>
<!-- The hidden div -->
<div id="Hideit" style="display: none;">
<br><p>Once you are ready for allotment (All departments have registered and all students have filled their priorities), just start the allotment by clicking on the button below.</p>
Expand Down
9 changes: 8 additions & 1 deletion views/design/js/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ $(document).ready(function(){
$("button").click(function(){
$("#Hideit").toggle();
});
});
});

//print allotment result
$(document).ready(function(){
$("button").click(function(){
printData();
});
});

0 comments on commit 850b0ce

Please sign in to comment.