Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 2 Main #18

Merged
merged 25 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
Binary file added application/.DS_Store
Binary file not shown.
4 changes: 0 additions & 4 deletions application/controllers/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -862,10 +862,6 @@ function system_settings($param1 = '', $param2 = '', $param3 = '')
$this->db->where('type' , 'system_name');
$this->db->update('settings' , $data);

$data['description'] = $this->input->post('language');
$this->db->where('type' , 'language');
$this->db->update('settings' , $data);

$data['description'] = $this->input->post('text_align');
$this->db->where('type' , 'text_align');
$this->db->update('settings' , $data);
Expand Down
17 changes: 0 additions & 17 deletions application/helpers/multi_language_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,6 @@ function get_phrase($phrase = '') {
$current_language = 'english';
$CI->session->set_userdata('current_language' , $current_language);
}


/** insert blank phrases initially and populating the language db ***/
$check_phrase = $CI->db->get_where('language' , array('phrase' => $phrase))->row()->phrase;
if ( $check_phrase != $phrase)
$CI->db->insert('language' , array('phrase' => $phrase));


// query for finding the phrase from `language` table
$query = $CI->db->get_where('language' , array('phrase' => $phrase));
$row = $query->row();

// return the current sessioned language field of according phrase, else return uppercase spaced word
if (isset($row->$current_language) && $row->$current_language !="")
return $row->$current_language;
else
return ucwords(str_replace('_',' ',$phrase));
}
}

Expand Down
Binary file added application/htdocs
Binary file not shown.
Binary file added application/views/.DS_Store
Binary file not shown.
Binary file added application/views/backend/.DS_Store
Binary file not shown.
232 changes: 121 additions & 111 deletions application/views/backend/admin/class.php
Original file line number Diff line number Diff line change
@@ -1,133 +1,143 @@
<div class="row" style="color:#001911 ;font-family: system-ui;font-size:14px;">
<div class="col-md-12">

<!------CONTROL TABS START------>
<ul class="nav nav-tabs bordered">
<li class="active">
<a href="#list" data-toggle="tab"><i class="entypo-menu"></i>
<?php echo ('Class List');?>
</a></li>
<li>
<a href="#add" data-toggle="tab"><i class="entypo-plus-circled"></i>
<?php echo ('Add Class');?>
</a></li>
</ul>
<!------CONTROL TABS END------>

<div class="tab-content">
<div class="col-md-12">

<!------CONTROL TABS START------>
<ul class="nav nav-tabs bordered">
<li class="active">
<a href="#list" data-toggle="tab"><i class="entypo-menu"></i>
<?php echo ('Class List'); ?>
</a>
</li>
<li>
<a href="#add" data-toggle="tab"><i class="entypo-plus-circled"></i>
<?php echo ('Add Class'); ?>
</a>
</li>
</ul>
<!------CONTROL TABS END------>

<div class="tab-content">
<!----TABLE LISTING STARTS-->
<div class="tab-pane box active" id="list">

<table class="table table-bordered table-hover table-striped datatable" id="table_export">
<thead>
<tr>
<th><div>#</div></th>
<th><div><?php echo ('Class name');?></div></th>
<th><div><?php echo ('Numeric Name');?></div></th>
<th><div><?php echo ('Teacher');?></div></th>
<th><div><?php echo ('Options');?></div></th>
</tr>
</thead>
<tbody>
<?php $count = 1;foreach($classes as $row):?>
<thead>
<tr>
<td><?php echo $count++;?></td>
<td><?php echo $row['name'];?></td>
<td><?php echo $row['name_numeric'];?></td>
<td><?php echo $this->crud_model->get_type_name_by_id('teacher',$row['teacher_id']);?></td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-default pull-right" role="menu">

<!-- EDITING LINK -->
<li>
<a href="#" onclick="showAjaxModal('<?php echo base_url();?>index.php?modal/popup/modal_edit_class/<?php echo $row['class_id'];?>');">
<i class="entypo-pencil"></i>
<?php echo ('Edit');?>
</a>
</li>
<li class="divider"></li>

<!-- DELETION LINK -->
<li>
<a href="#" onclick="confirm_modal('<?php echo base_url();?>index.php?admin/classes/delete/<?php echo $row['class_id'];?>');">
<i class="entypo-trash"></i>
<?php echo ('Delete');?>
</a>
</li>
</ul>
</div>
</td>
<th>
<div>#</div>
</th>
<th>
<div><?php echo ('Class name'); ?></div>
</th>
<th>
<div><?php echo ('Numeric Name'); ?></div>
</th>
<th>
<div><?php echo ('Teacher'); ?></div>
</th>
<th>
<div><?php echo ('Options'); ?></div>
</th>
</tr>
<?php endforeach;?>
</thead>
<tbody>
<?php $count = 1;
foreach ($classes as $row) : ?>
<tr>
<td><?php echo $count++; ?></td>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['name_numeric']; ?></td>
<td><?php echo $this->crud_model->get_type_name_by_id('teacher', $row['teacher_id']); ?></td>
<td>
<div class="btn-group">
<button type="button" class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-default pull-right" role="menu">

<!-- EDITING LINK -->
<li>
<a href="#" onclick="showAjaxModal('<?php echo base_url(); ?>index.php?modal/popup/modal_edit_class/<?php echo $row['class_id']; ?>');">
<i class="entypo-pencil"></i>
<?php echo ('Edit'); ?>
</a>
</li>
<li class="divider"></li>

<!-- DELETION LINK -->
<li>
<a href="#" onclick="confirm_modal('<?php echo base_url(); ?>index.php?admin/classes/delete/<?php echo $row['class_id']; ?>');">
<i class="entypo-trash"></i>
<?php echo ('Delete'); ?>
</a>
</li>
</ul>
</div>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<!----TABLE LISTING ENDS--->
<!----CREATION FORM STARTS---->
<div class="tab-pane box" id="add" style="padding: 5px">

<!----CREATION FORM STARTS---->
<div class="tab-pane box" id="add" style="padding: 5px">
<div class="box-content">
<?php echo form_open(base_url() . 'index.php?admin/classes/create' , array('class' => 'form-horizontal form-groups-bordered validate','target'=>'_top'));?>
<div class="padded">
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo ('Name');?></label>
<div class="col-sm-5">
<input type="text" class="form-control" name="name" data-validate="required" data-message-required="<?php echo get_phrase('value_required');?>"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo ('Name Numeric');?></label>
<div class="col-sm-5">
<input type="text" class="form-control" name="name_numeric"/>
</div>
<?php echo form_open(base_url() . 'index.php?admin/classes/create', array('class' => 'form-horizontal form-groups-bordered validate', 'target' => '_top')); ?>
<div class="padded">
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo ('Class Name'); ?></label>
<div class="col-sm-5">
<input type="text" class="form-control" placeholder="Enter Class Name Here" name="name" data-validate="required" data-message-required="<?php echo ('*This Field is Required'); ?>" />
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo ('Teacher');?></label>
<div class="col-sm-5">
<select name="teacher_id" class="form-control" style="width:100%;">
<?php
$teachers = $this->db->get('teacher')->result_array();
foreach($teachers as $row):
?>
<option value="<?php echo $row['teacher_id'];?>"><?php echo $row['name'];?></option>
<?php
endforeach;
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"><?php echo ('Numeric Name'); ?></label>
<div class="col-sm-5">
<input type="text" class="form-control" placeholder="Enter Numeric Name Here" name="name_numeric" data-validate="required" data-message-required="<?php echo ('*This Field is Required'); ?>" />
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-5">
<button type="submit" class="btn btn-info"><?php echo ('Add Class');?></button>
</div>
</div>
</form>
</div>
</div>
<!----CREATION FORM ENDS-->
</div>
</div>
<label class="col-sm-3 control-label"><?php echo ('Class Teacher'); ?></label>
<div class="col-sm-5">
<select name="teacher_id" class="form-control" style="width:100%;">
<?php
$teachers = $this->db->get('teacher')->result_array();
foreach ($teachers as $row) :
?>
<option value="<?php echo $row['teacher_id']; ?>"><?php echo $row['name']; ?></option>
<?php
endforeach;
?>
</select>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-5">
<button type="submit" class="btn btn-info"><?php echo ('Add Class'); ?></button>
</div>
</div>
</form>
</div>
</div>
<!----CREATION FORM ENDS-->
</div>
</div>
</div>



<!----- DATA TABLE EXPORT CONFIGURATIONS ---->
<!----- DATA TABLE EXPORT CONFIGURATIONS ---->
<script type="text/javascript">
jQuery(document).ready(function($) {


jQuery(document).ready(function($)
{

var datatable = $("#table_export").dataTable();

var datatable = $("#table_export").dataTable();

$(".dataTables_wrapper select").select2({
minimumResultsForSearch: -1
});
});

$(".dataTables_wrapper select").select2({
minimumResultsForSearch: -1
});
});
</script>
38 changes: 19 additions & 19 deletions application/views/backend/admin/class_routine.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion-test-2" href="#collapse<?php echo $row['class_id'];?>">
<i class="entypo-rss"></i> Class <?php echo $row['name'];?>
<i class="entypo-rss"></i> <?php echo $row['name'];?>
</a>
</h4>
</div>
Expand All @@ -42,13 +42,13 @@
<?php
for($d=1;$d<=7;$d++):

if($d==1)$day='sunday';
else if($d==2)$day='monday';
else if($d==3)$day='tuesday';
else if($d==4)$day='wednesday';
else if($d==5)$day='thursday';
else if($d==6)$day='friday';
else if($d==7)$day='saturday';
if($d==1)$day='Sunday';
else if($d==2)$day='Monday';
else if($d==3)$day='Tuesday';
else if($d==4)$day='Wednesday';
else if($d==5)$day='Thursday';
else if($d==6)$day='Friday';
else if($d==7)$day='Saturday';
?>
<tr class="gradeA">
<td width="100"><?php echo strtoupper($day);?></td>
Expand Down Expand Up @@ -136,13 +136,13 @@
<label class="col-sm-3 control-label"><?php echo ('Day');?></label>
<div class="col-sm-5">
<select name="day" class="form-control" style="width:100%;">
<option value="sunday">sunday</option>
<option value="monday">monday</option>
<option value="tuesday">tuesday</option>
<option value="wednesday">wednesday</option>
<option value="thursday">thursday</option>
<option value="friday">friday</option>
<option value="saturday">saturday</option>
<option value="Sunday">Sunday</option>
<option value="Monday">Monday</option>
<option value="Tuesday">Tuesday</option>
<option value="Wednesday">Wednesday</option>
<option value="Thursday">Thursday</option>
<option value="Friday">Friday</option>
<option value="Saturday">Saturday</option>
</select>
</div>
</div>
Expand All @@ -155,8 +155,8 @@
<?php endfor;?>
</select>
<select name="starting_ampm" class="form-control" style="width:100%">
<option value="1">am</option>
<option value="2">pm</option>
<option value="1">AM</option>
<option value="2">PM</option>
</select>
</div>
</div>
Expand All @@ -169,8 +169,8 @@
<?php endfor;?>
</select>
<select name="ending_ampm" class="form-control" style="width:100%">
<option value="1">am</option>
<option value="2">pm</option>
<option value="1">AM</option>
<option value="2">PM</option>
</select>
</div>
</div>
Expand Down
Loading