Overriding view files (#116)

This commit is contained in:
FrancescoUK
2016-01-07 19:17:04 +00:00
parent 4dd3c64e9d
commit 206751de0e
12 changed files with 7460 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Loader extends CI_Loader {
public function __construct()
{
parent::__construct();
log_message('debug', "MY_Loader Class Initialized");
}
function view($view, $vars = array(), $return = FALSE)
{
// add other first view path
$this->_ci_view_paths = array_merge(array(realpath('templates/flatly').DIRECTORY_SEPARATOR => 1), $this->_ci_view_paths);
return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
}
}

View File

@@ -3,7 +3,7 @@
function get_sales_manage_table($sales, $controller)
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$table='<table class="tablesorter table table-striped table-hover" id="sortable_table">';
$headers = array('&nbsp;',
$CI->lang->line('sales_receipt_number'),
@@ -121,7 +121,7 @@ Gets the html table to manage people.
function get_people_manage_table($people,$controller)
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$table='<table class="tablesorter table table-striped table-hover" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('common_last_name'),
@@ -202,7 +202,7 @@ Gets the html table to manage suppliers.
function get_supplier_manage_table($suppliers,$controller)
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$table='<table class="tablesorter table table-striped table-hover" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('suppliers_company_name'),
@@ -274,7 +274,7 @@ Gets the html table to manage items.
function get_items_manage_table($items,$controller)
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$table='<table class="tablesorter table table-striped table-hover" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('items_item_number'),
@@ -374,7 +374,7 @@ Gets the html table to manage giftcards.
function get_giftcards_manage_table( $giftcards, $controller )
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$table='<table class="tablesorter table table-striped table-hover" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('common_last_name'),
@@ -441,7 +441,7 @@ Gets the html table to manage item kits.
function get_item_kits_manage_table( $item_kits, $controller )
{
$CI =& get_instance();
$table='<table class="tablesorter" id="sortable_table">';
$table='<table class="tablesorter table table-striped table-hover" id="sortable_table">';
$headers = array('<input type="checkbox" id="select_all" />',
$CI->lang->line('item_kits_kit'),

View File

@@ -6,6 +6,7 @@
<title><?php echo $this->config->item('company').' -- '.$this->lang->line('common_powered_by').' OS Point Of Sale' ?></title>
<link rel="shortcut icon" type="image/x-icon" href="<?php echo base_url();?>/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/ospos.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="css/ospos_print.css" media="print" />
<?php if ($this->input->cookie('debug') == "true" || $this->input->get("debug") == "true") : ?>
<!-- start js template tags -->

7079
css/bootstrap.css vendored Executable file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -65,7 +65,7 @@
{
position:relative;
width:75%;
left:200px;
left:315px;
top:8px;
height:45%;
}

View File

@@ -0,0 +1,12 @@
</div>
</div>
<div id="footer">
<?php echo $this->lang->line('common_you_are_using_ospos'); ?>
<?php echo $this->config->item('application_version'); ?>.
<?php echo $this->lang->line('common_please_visit_my'); ?>
<a href="https://github.com/jekkos/opensourcepos" target="_blank"><?php echo $this->lang->line('common_website'); ?></a>
<?php echo $this->lang->line('common_learn_about_project'); ?>
</div>
</body>
</html>

View File

@@ -0,0 +1,3 @@
<!-- Export Excel Template, By OpenJoombiz.com -->
</body>
</html>

View File

@@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<base href="<?php echo base_url();?>" />
<title><?php echo $this->config->item('company').' -- '.$this->lang->line('common_powered_by').' OS Point Of Sale' ?></title>
<link rel="stylesheet" type="text/css" href="css/ospos.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="css/ospos_print.css" media="print" />
<?php if ($this->input->cookie('debug') == "true" || $this->input->get("debug") == "true") : ?>
<!-- start js template tags -->
<script type="text/javascript" src="js/jquery-1.8.3.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery-ui-1.11.4.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery-ui-timepicker-addon.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.ajax_queue.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.autocomplete.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.bgiframe.min.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.color.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.form-3.51.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.jkey-1.1.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.metadata.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.tablesorter-2.20.1.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.tablesorter.staticrow.js" language="javascript"></script>
<script type="text/javascript" src="js/jquery.validate-1.13.1-min.js" language="javascript"></script>
<script type="text/javascript" src="js/common.js" language="javascript"></script>
<script type="text/javascript" src="js/date.js" language="javascript"></script>
<script type="text/javascript" src="js/imgpreview.full.jquery.js" language="javascript"></script>
<script type="text/javascript" src="js/manage_tables.js" language="javascript"></script>
<script type="text/javascript" src="js/nominatim.autocomplete.js" language="javascript"></script>
<script type="text/javascript" src="js/swfobject.js" language="javascript"></script>
<script type="text/javascript" src="js/tabcontent.js" language="javascript"></script>
<script type="text/javascript" src="js/thickbox.js" language="javascript"></script>
<!-- end js template tags -->
<?php else : ?>
<!-- start minjs template tags -->
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=cb9e5b15ec" language="javascript"></script>
<!-- end minjs template tags -->
<?php endif; ?>
<script type="text/javascript">
function logout(logout)
{
logout = logout && <?php echo $backup_allowed;?>;
if (logout && confirm("<?php echo $this->lang->line('config_logout'); ?>"))
{
window.location = "<?php echo site_url('config/backup_db'); ?>";
}
else
{
window.location = "<?php echo site_url('home/logout'); ?>";
}
}
</script>
<style type="text/css">
html {
overflow: auto;
}
</style>
</head>
<body>
<div id="menubar">
<div id="menubar_container">
<div id="menubar_company_info">
<span id="company_title"><?php echo $this->config->item('company'); ?></span><br />
<span style='font-size:8pt;'><?php echo $this->lang->line('common_powered_by').' Open Source Point Of Sale'; ?></span>
</div>
<div id="menubar_navigation">
<?php
foreach($allowed_modules->result() as $module)
{
?>
<div class="menu_item">
<a href="<?php echo site_url("$module->module_id");?>">
<img src="<?php echo base_url().'images/menubar/'.$module->module_id.'.png';?>" border="0" alt="Menubar Image"></a><br>
<a href="<?php echo site_url("$module->module_id");?>"><?php echo $this->lang->line("module_".$module->module_id) ?></a>
</div>
<?php
}
?>
</div>
<div id="menubar_footer">
<?php echo $this->lang->line('common_welcome')." $user_info->first_name $user_info->last_name! | "; ?>
<a href="javascript:logout(true);"><?php echo $this->lang->line("common_logout"); ?></a>
</div>
<div id="menubar_date">
<?php echo date($this->config->item('dateformat').' '.$this->config->item('timeformat')) ?>
</div>
</div>
</div>
<div id="content_area_wrapper">
<div id="content_area">

View File

@@ -0,0 +1,54 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $this->config->item('company').' -- '.$this->lang->line('common_powered_by').' Open Source Point Of Sale' ?></title>
<style type="text/css">
html {
overflow: auto;
}
body
{
background-color:#FFFFFF;
font-size:100%;
}
#menubar,#footer
{
display:none;
}
#content_area
{
width:100%;
}
#content_area_wrapper
{
border:0px;
}
#sale_return_policy
{
width:100%;
text-align:center;
}
.long_name
{
display:none;
}
.short_name
{
display:inline;
}
#receipt_items td
{
white-space:nowrap;
}
</style>
</head>
<body>

View File

@@ -0,0 +1,75 @@
<?php if ($print_after_sale)
{
?>
<script type="text/javascript">
$(window).load(function()
{
// receipt layout sanity check
if ( $("#receipt_items, #items").length > 0)
{
// install firefox addon in order to use this plugin
if (window.jsPrintSetup)
{
// set top margins in millimeters
jsPrintSetup.setOption('marginTop', <?php echo $this->Appconfig->get('print_top_margin'); ?>);
jsPrintSetup.setOption('marginLeft', <?php echo $this->Appconfig->get('print_left_margin'); ?>);
jsPrintSetup.setOption('marginBottom', <?php echo $this->Appconfig->get('print_bottom_margin'); ?>);
jsPrintSetup.setOption('marginRight', <?php echo $this->Appconfig->get('print_right_margin'); ?>);
<?php if (!$this->Appconfig->get('print_header'))
{
?>
// set page header
jsPrintSetup.setOption('headerStrLeft', '');
jsPrintSetup.setOption('headerStrCenter', '');
jsPrintSetup.setOption('headerStrRight', '');
<?php
}
if (!$this->Appconfig->get('print_footer'))
{
?>
// set empty page footer
jsPrintSetup.setOption('footerStrLeft', '');
jsPrintSetup.setOption('footerStrCenter', '');
jsPrintSetup.setOption('footerStrRight', '');
<?php
}
?>
var printers = jsPrintSetup.getPrintersList().split(',');
// get right printer here..
for(var index in printers) {
var default_ticket_printer = window.localStorage && localStorage['<?php echo $selected_printer; ?>'];
var selected_printer = printers[index];
if (selected_printer == default_ticket_printer) {
// select epson label printer
jsPrintSetup.setPrinter(selected_printer);
// clears user preferences always silent print value
// to enable using 'printSilent' option
jsPrintSetup.clearSilentPrint();
<?php if (!$this->Appconfig->get('print_silently'))
{
?>
// Suppress print dialog (for this context only)
jsPrintSetup.setOption('printSilent', 1);
<?php
}
?>
// Do Print
// When print is submitted it is executed asynchronous and
// script flow continues after print independently of completetion of print process!
jsPrintSetup.print();
}
}
}
else
{
window.print();
}
}
});
</script>
<?php
}
?>

View File

@@ -0,0 +1,20 @@
<?php $i = 0; ?>
<?php foreach($stock_locations as $location => $location_data ) { ?>
<?php $location_id = $location_data['location_id']; ?>
<?php $location_name = $location_data['location_name']; ?>
<div class="field_row clearfix" style="<?php echo $location_data['deleted'] ? 'display:none;' : 'display:block;' ?>">
<?php echo form_label($this->lang->line('config_stock_location').' ' .++$i. ':', 'stock_location_'.$i ,array('class'=>'required wide')); ?>
<div class='form_field'>
<?php $form_data = array(
'name'=>'stock_location_'.$location_id,
'id'=>'stock_location_'.$location_id,
'class'=>'stock_location valid_chars required',
'value'=>$location_name);
$location_data['deleted'] && $form_data['disabled'] = 'disabled';
echo form_input($form_data);
?>
</div>
<img class="add_stock_location" src="<?php echo base_url('images/plus.png'); ?>" />
<img class="remove_stock_location" src="<?php echo base_url('images/minus.png'); ?>" />
</div>
<?php } ?>

View File

@@ -0,0 +1,93 @@
<?php $this->load->view("partial/header"); ?>
<script type="text/javascript">
$(document).ready(function()
{
init_table_sorting();
enable_select_all();
enable_row_selection();
enable_search({ suggest_url : '<?php echo site_url("$controller_name/suggest")?>',
confirm_search_message : '<?php echo $this->lang->line("common_confirm_search")?>'});
enable_email('<?php echo site_url("$controller_name/mailto")?>');
enable_delete('<?php echo $this->lang->line($controller_name."_confirm_delete")?>','<?php echo $this->lang->line($controller_name."_none_selected")?>');
});
function init_table_sorting()
{
//Only init if there is more than one row
if($('.tablesorter tbody tr').length >1)
{
$("#sortable_table").tablesorter(
{
sortList: [[1,0]],
headers:
{
0: { sorter: false},
5: { sorter: false}
}
});
}
}
function post_person_form_submit(response)
{
if(!response.success)
{
set_feedback(response.message,'error_message',true);
}
else
{
//This is an update, just update one row
if(jQuery.inArray(response.person_id,get_visible_checkbox_ids()) != -1)
{
update_row(response.person_id,'<?php echo site_url("$controller_name/get_row")?>');
set_feedback(response.message,'success_message',false);
}
else //refresh entire table
{
do_search(true,function()
{
//highlight new row
hightlight_row(response.person_id);
set_feedback(response.message,'success_message',false);
});
}
}
}
</script>
<div id="title_bar">
<h2 class="float_left"><?php echo $this->lang->line('common_list_of').' '.$this->lang->line('module_'.$controller_name); ?></h2>
<div id="new_button">
<?php echo anchor("$controller_name/view/-1/width:$form_width", $this->lang->line($controller_name.'_new'),
array('class'=>'thickbox none btn btn-primary','title'=>$this->lang->line($controller_name.'_new')));
?>
<?php if ($controller_name =='customers') {?>
<?php echo anchor("$controller_name/excel_import/width:$form_width",
$this->lang->line('common_import_excel'),
array('class'=>'thickbox none btn btn-primary','title'=>'Import Items from Excel'));
?>
<?php } ?>
</div>
</div>
<div id="pagination" class="pagination"><?= $links ?></div>
<div id="table_action_header">
<ul>
<li class="float_left"><span><?php echo anchor("$controller_name/delete",$this->lang->line("common_delete"),array('id'=>'delete', 'class' => 'btn btn-default btn-xs')); ?></span></li>
<li class="float_left"><span><a href="#" id="email" class="btn btn-default btn-xs"><?php echo $this->lang->line("common_email");?></a></span></li>
<li class="float_right">
<img src='<?php echo base_url()?>images/spinner_small.gif' alt='spinner' id='spinner' />
<?php echo form_open("$controller_name/search",array('id'=>'search_form')); ?>
<input type="text" name ='search' id='search'/>
<input type="hidden" name ='limit_from' id='limit_from'/>
</form>
</li>
</ul>
</div>
<div id="table_holder">
<?php echo $manage_table; ?>
</div>
<div id="feedback_bar"></div>
<?php $this->load->view("partial/footer"); ?>