2013-07-17 19:29:51 +03:00
|
|
|
<script type="text/javascript"
|
2015-01-29 00:53:13 +02:00
|
|
|
src="<?php echo $base_url; ?>/assets/js/backend_services.js"></script>
|
2013-07-17 19:29:51 +03:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
var GlobalVariables = {
|
2015-05-28 00:47:19 +03:00
|
|
|
'csrfToken': <?php echo json_encode($this->security->get_csrf_hash()); ?>,
|
2013-07-17 19:29:51 +03:00
|
|
|
'baseUrl': <?php echo '"' . $base_url . '"'; ?>,
|
|
|
|
'services': <?php echo json_encode($services); ?>,
|
2013-09-26 19:06:57 +03:00
|
|
|
'categories': <?php echo json_encode($categories); ?>,
|
|
|
|
'user' : {
|
|
|
|
'id' : <?php echo $user_id; ?>,
|
|
|
|
'email' : <?php echo '"' . $user_email . '"'; ?>,
|
|
|
|
'role_slug' : <?php echo '"' . $role_slug . '"'; ?>,
|
|
|
|
'privileges': <?php echo json_encode($privileges); ?>
|
|
|
|
}
|
2013-07-17 19:29:51 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
BackendServices.initialize(true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="services-page" class="row-fluid">
|
|
|
|
<ul class="nav nav-tabs">
|
2013-12-20 19:44:44 +02:00
|
|
|
<li class="services-tab tab active"><a><?php echo $this->lang->line('services'); ?></a></li>
|
|
|
|
<li class="categories-tab tab"><a><?php echo $this->lang->line('categories'); ?></a></li>
|
2013-07-17 19:29:51 +03:00
|
|
|
</ul>
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<?php
|
|
|
|
// --------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// SERVICES TAB
|
|
|
|
//
|
|
|
|
// --------------------------------------------------------------
|
|
|
|
?>
|
2013-07-17 19:29:51 +03:00
|
|
|
<div id="services" class="tab-content">
|
|
|
|
<?php // FILTER SERVICES ?>
|
2013-09-25 18:43:17 +03:00
|
|
|
<div id="filter-services" class="filter-records column span4">
|
|
|
|
<form class="input-append">
|
2013-11-21 23:58:51 +02:00
|
|
|
<input class="key span12" type="text" />
|
2013-12-20 19:44:44 +02:00
|
|
|
<button class="filter btn" type="submit" title="<?php echo $this->lang->line('filter'); ?>">
|
2013-11-21 23:58:51 +02:00
|
|
|
<i class="icon-search"></i>
|
2013-09-25 18:43:17 +03:00
|
|
|
</button>
|
2013-12-20 19:44:44 +02:00
|
|
|
<button class="clear btn" type="button" title="<?php echo $this->lang->line('clear'); ?>">
|
2013-11-21 23:58:51 +02:00
|
|
|
<i class="icon-repeat"></i>
|
2013-09-25 18:43:17 +03:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('services'); ?></h2>
|
2013-09-25 18:43:17 +03:00
|
|
|
<div class="results"></div>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
|
2013-09-25 18:43:17 +03:00
|
|
|
<div class="details column span7">
|
2013-07-17 19:29:51 +03:00
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div class="add-edit-delete-group btn-group">
|
2013-10-10 19:50:33 +03:00
|
|
|
<button id="add-service" class="btn btn-primary">
|
|
|
|
<i class="icon-plus icon-white"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('add'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
<button id="edit-service" class="btn" disabled="disabled">
|
|
|
|
<i class="icon-pencil"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('edit'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
<button id="delete-service" class="btn" disabled="disabled">
|
|
|
|
<i class="icon-remove"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('delete'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="save-cancel-group btn-group" style="display:none;">
|
2013-10-27 14:53:51 +02:00
|
|
|
<button id="save-service" class="btn btn-primary">
|
2013-10-27 19:41:37 +02:00
|
|
|
<i class="icon-ok icon-white"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('save'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
<button id="cancel-service" class="btn">
|
|
|
|
<i class="icon-ban-circle"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('cancel'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('details'); ?></h2>
|
2013-07-17 19:29:51 +03:00
|
|
|
<div class="form-message alert" style="display:none;"></div>
|
|
|
|
|
|
|
|
<input type="hidden" id="service-id" />
|
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="service-name"><?php echo $this->lang->line('name'); ?> *</label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<input type="text" id="service-name" class="span12 required" />
|
2013-07-17 19:29:51 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="service-duration"><?php echo $this->lang->line('duration_minutes'); ?> *</label>
|
2013-07-19 18:29:59 +03:00
|
|
|
<input type="text" id="service-duration" class="required" />
|
2013-07-17 19:29:51 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="service-price"><?php echo $this->lang->line('price'); ?> *</label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<input type="text" id="service-price" class="span12 required" />
|
2013-07-17 19:29:51 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="service-currency"><?php echo $this->lang->line('currency'); ?></label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<input type="text" id="service-currency" class="span12" />
|
2013-07-17 19:29:51 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="service-category"><?php echo $this->lang->line('category'); ?></label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<select id="service-category" class="span12"></select>
|
2013-10-17 18:31:43 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="service-description"><?php echo $this->lang->line('description'); ?></label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<textarea id="service-description" rows="4" class="span12"></textarea>
|
2013-07-18 00:10:42 +03:00
|
|
|
|
|
|
|
<br/><br/>
|
2013-12-19 18:28:19 +02:00
|
|
|
<em id="form-message" class="text-error">
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('fields_are_required'); ?></em>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-09-13 16:21:03 +03:00
|
|
|
<?php
|
|
|
|
// --------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// CATEGORIES TAB
|
|
|
|
//
|
|
|
|
// --------------------------------------------------------------
|
|
|
|
?>
|
2013-07-17 19:29:51 +03:00
|
|
|
<div id="categories" class="tab-content" style="display:none;">
|
2013-09-25 18:43:17 +03:00
|
|
|
<div id="filter-categories" class="filter-records column span4">
|
|
|
|
<form class="input-append">
|
2013-11-21 23:58:51 +02:00
|
|
|
<input class="key span12" type="text" />
|
2013-12-20 19:44:44 +02:00
|
|
|
<button class="filter btn" type="submit" title="<?php echo $this->lang->line('filter'); ?>">
|
2013-11-21 23:58:51 +02:00
|
|
|
<i class="icon-search"></i>
|
2013-09-25 18:43:17 +03:00
|
|
|
</button>
|
2013-12-20 19:44:44 +02:00
|
|
|
<button class="clear btn" type="button" title="<?php echo $this->lang->line('clear'); ?>">
|
2013-11-21 23:58:51 +02:00
|
|
|
<i class="icon-repeat"></i>
|
2013-09-25 18:43:17 +03:00
|
|
|
</button>
|
|
|
|
</form>
|
2013-07-17 19:29:51 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('categories'); ?></h2>
|
2013-09-25 18:43:17 +03:00
|
|
|
<div class="results"></div>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="details span7">
|
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div class="add-edit-delete-group btn-group">
|
2013-10-10 19:50:33 +03:00
|
|
|
<button id="add-category" class="btn btn-primary">
|
|
|
|
<i class="icon-plus icon-white"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('add'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
<button id="edit-category" class="btn" disabled="disabled">
|
|
|
|
<i class="icon-pencil"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('edit'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
<button id="delete-category" class="btn" disabled="disabled">
|
|
|
|
<i class="icon-remove"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('delete'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="save-cancel-group btn-group" style="display:none;">
|
2013-10-27 14:53:51 +02:00
|
|
|
<button id="save-category" class="btn btn-primary">
|
2013-10-27 19:41:37 +02:00
|
|
|
<i class="icon-ok icon-white"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('save'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
<button id="cancel-category" class="btn">
|
|
|
|
<i class="icon-ban-circle"></i>
|
2013-12-20 19:44:44 +02:00
|
|
|
<?php echo $this->lang->line('cancel'); ?>
|
2013-12-19 18:28:19 +02:00
|
|
|
</button>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<h2><?php echo $this->lang->line('details'); ?></h2>
|
2013-07-17 19:29:51 +03:00
|
|
|
<div class="form-message alert" style="display:none;"></div>
|
|
|
|
|
2013-07-19 18:29:59 +03:00
|
|
|
<input type="hidden" id="category-id" />
|
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="category-name"><?php echo $this->lang->line('name'); ?> *</label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<input type="text" id="category-name" class="span12 required" />
|
2013-07-17 19:29:51 +03:00
|
|
|
|
2013-12-20 19:44:44 +02:00
|
|
|
<label for="category-description"><?php echo $this->lang->line('description'); ?></label>
|
2013-10-18 17:56:12 +03:00
|
|
|
<textarea id="category-description" rows="4" class="span12"></textarea>
|
2013-07-17 19:29:51 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|