Refactored services.php page for bootstrap 3.

This commit is contained in:
Alex Tselegidis 2015-07-25 12:20:14 +02:00
parent ce1882b157
commit 2f58b551c5
2 changed files with 69 additions and 50 deletions

View file

@ -20,10 +20,10 @@
}); });
</script> </script>
<div id="services-page" class="row-fluid"> <div id="services-page" class="container-fluid">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="services-tab tab active"><a><?php echo $this->lang->line('services'); ?></a></li> <li role="presentation" 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> <li role="presentation" class="categories-tab tab"><a><?php echo $this->lang->line('categories'); ?></a></li>
</ul> </ul>
<?php <?php
@ -35,14 +35,14 @@
?> ?>
<div id="services" class="tab-content"> <div id="services" class="tab-content">
<?php // FILTER SERVICES ?> <?php // FILTER SERVICES ?>
<div id="filter-services" class="filter-records column span4"> <div id="filter-services" class="filter-records column col-md-4">
<form class="input-append"> <form class="input-append">
<input class="key span12" type="text" /> <input class="key span12" type="text" />
<button class="filter btn" type="submit" title="<?php echo $this->lang->line('filter'); ?>"> <button class="filter btn btn-sm" type="submit" title="<?php echo $this->lang->line('filter'); ?>">
<i class="icon-search"></i> <span class="glyphglyphicon glyphicon glyphglyphicon glyphicon-search"></span>
</button> </button>
<button class="clear btn" type="button" title="<?php echo $this->lang->line('clear'); ?>"> <button class="clear btn btn-sm" type="button" title="<?php echo $this->lang->line('clear'); ?>">
<i class="icon-repeat"></i> <span class="glyphglyphicon glyphicon glyphglyphicon glyphicon-repeat"></span>
</button> </button>
</form> </form>
@ -50,30 +50,30 @@
<div class="results"></div> <div class="results"></div>
</div> </div>
<div class="details column span7"> <div class="details column col-md-7">
<div class="btn-toolbar"> <div class="btn-toolbar">
<div class="add-edit-delete-group btn-group"> <div class="add-edit-delete-group btn-group">
<button id="add-service" class="btn btn-primary"> <button id="add-service" class="btn btn-primary">
<i class="icon-plus icon-white"></i> <span class="glyphicon glyphicon-plus"></span>
<?php echo $this->lang->line('add'); ?> <?php echo $this->lang->line('add'); ?>
</button> </button>
<button id="edit-service" class="btn" disabled="disabled"> <button id="edit-service" class="btn" disabled="disabled">
<i class="icon-pencil"></i> <span class="glyphicon glyphicon-pencil"></span>
<?php echo $this->lang->line('edit'); ?> <?php echo $this->lang->line('edit'); ?>
</button> </button>
<button id="delete-service" class="btn" disabled="disabled"> <button id="delete-service" class="btn" disabled="disabled">
<i class="icon-remove"></i> <span class="glyphicon glyphicon-remove"></span>
<?php echo $this->lang->line('delete'); ?> <?php echo $this->lang->line('delete'); ?>
</button> </button>
</div> </div>
<div class="save-cancel-group btn-group" style="display:none;"> <div class="save-cancel-group btn-group" style="display:none;">
<button id="save-service" class="btn btn-primary"> <button id="save-service" class="btn btn-primary">
<i class="icon-ok icon-white"></i> <span class="glyphicon glyphicon-ok"></span>
<?php echo $this->lang->line('save'); ?> <?php echo $this->lang->line('save'); ?>
</button> </button>
<button id="cancel-service" class="btn"> <button id="cancel-service" class="btn">
<i class="icon-ban-circle"></i> <span class="glyphicon glyphicon-ban-circle"></span>
<?php echo $this->lang->line('cancel'); ?> <?php echo $this->lang->line('cancel'); ?>
</button> </button>
</div> </div>
@ -81,27 +81,40 @@
<h2><?php echo $this->lang->line('details'); ?></h2> <h2><?php echo $this->lang->line('details'); ?></h2>
<div class="form-message alert" style="display:none;"></div> <div class="form-message alert" style="display:none;"></div>
<input type="hidden" id="service-id" /> <input type="hidden" id="service-id" />
<label for="service-name"><?php echo $this->lang->line('name'); ?> *</label> <div class="form-group">
<input type="text" id="service-name" class="span12 required" /> <label for="service-name"><?php echo $this->lang->line('name'); ?> *</label>
<input type="text" id="service-name" class="form-control required" />
<label for="service-duration"><?php echo $this->lang->line('duration_minutes'); ?> *</label> </div>
<input type="text" id="service-duration" class="required" />
<div class="form-group">
<label for="service-price"><?php echo $this->lang->line('price'); ?> *</label> <label for="service-duration"><?php echo $this->lang->line('duration_minutes'); ?> *</label>
<input type="text" id="service-price" class="span12 required" /> <input type="text" id="service-duration" class="form-control required" />
</div>
<label for="service-currency"><?php echo $this->lang->line('currency'); ?></label>
<input type="text" id="service-currency" class="span12" /> <div class="form-group">
<label for="service-price"><?php echo $this->lang->line('price'); ?> *</label>
<label for="service-category"><?php echo $this->lang->line('category'); ?></label> <input type="text" id="service-price" class="form-control required" />
<select id="service-category" class="span12"></select> </div>
<label for="service-description"><?php echo $this->lang->line('description'); ?></label> <div class="form-group">
<textarea id="service-description" rows="4" class="span12"></textarea> <label for="service-currency"><?php echo $this->lang->line('currency'); ?></label>
<input type="text" id="service-currency" class="form-control" />
</div>
<div class="form-group">
<label for="service-category"><?php echo $this->lang->line('category'); ?></label>
<select id="service-category" class="form-control"></select>
</div>
<div class="form-group">
<label for="service-description"><?php echo $this->lang->line('description'); ?></label>
<textarea id="service-description" rows="4" class="form-control"></textarea>
</div>
<br/><br/> <br/><br/>
<em id="form-message" class="text-error"> <em id="form-message" class="text-error">
<?php echo $this->lang->line('fields_are_required'); ?></em> <?php echo $this->lang->line('fields_are_required'); ?></em>
@ -116,14 +129,14 @@
// -------------------------------------------------------------- // --------------------------------------------------------------
?> ?>
<div id="categories" class="tab-content" style="display:none;"> <div id="categories" class="tab-content" style="display:none;">
<div id="filter-categories" class="filter-records column span4"> <div id="filter-categories" class="filter-records column col-md-4">
<form class="input-append"> <form class="input-append">
<input class="key span12" type="text" /> <input class="key" type="text" />
<button class="filter btn" type="submit" title="<?php echo $this->lang->line('filter'); ?>"> <button class="filter btn btn-sm" type="submit" title="<?php echo $this->lang->line('filter'); ?>">
<i class="icon-search"></i> <span class="glyphicon glyphicon-search"></span>
</button> </button>
<button class="clear btn" type="button" title="<?php echo $this->lang->line('clear'); ?>"> <button class="clear btn btn-sm" type="button" title="<?php echo $this->lang->line('clear'); ?>">
<i class="icon-repeat"></i> <span class="glyphicon glyphicon-repeat"></span>
</button> </button>
</form> </form>
@ -131,30 +144,30 @@
<div class="results"></div> <div class="results"></div>
</div> </div>
<div class="details span7"> <div class="details col-md-7">
<div class="btn-toolbar"> <div class="btn-toolbar">
<div class="add-edit-delete-group btn-group"> <div class="add-edit-delete-group btn-group">
<button id="add-category" class="btn btn-primary"> <button id="add-category" class="btn btn-primary">
<i class="icon-plus icon-white"></i> <span class="glyphicon glyphicon-plus glyphicon glyphicon-white"></span>
<?php echo $this->lang->line('add'); ?> <?php echo $this->lang->line('add'); ?>
</button> </button>
<button id="edit-category" class="btn" disabled="disabled"> <button id="edit-category" class="btn" disabled="disabled">
<i class="icon-pencil"></i> <span class="glyphicon glyphicon-pencil"></span>
<?php echo $this->lang->line('edit'); ?> <?php echo $this->lang->line('edit'); ?>
</button> </button>
<button id="delete-category" class="btn" disabled="disabled"> <button id="delete-category" class="btn" disabled="disabled">
<i class="icon-remove"></i> <span class="glyphicon glyphicon-remove"></span>
<?php echo $this->lang->line('delete'); ?> <?php echo $this->lang->line('delete'); ?>
</button> </button>
</div> </div>
<div class="save-cancel-group btn-group" style="display:none;"> <div class="save-cancel-group btn-group" style="display:none;">
<button id="save-category" class="btn btn-primary"> <button id="save-category" class="btn btn-primary">
<i class="icon-ok icon-white"></i> <span class="glyphicon glyphicon-ok glyphicon glyphicon-white"></span>
<?php echo $this->lang->line('save'); ?> <?php echo $this->lang->line('save'); ?>
</button> </button>
<button id="cancel-category" class="btn"> <button id="cancel-category" class="btn">
<i class="icon-ban-circle"></i> <span class="glyphicon glyphicon-ban-circle"></span>
<?php echo $this->lang->line('cancel'); ?> <?php echo $this->lang->line('cancel'); ?>
</button> </button>
</div> </div>
@ -165,11 +178,15 @@
<input type="hidden" id="category-id" /> <input type="hidden" id="category-id" />
<label for="category-name"><?php echo $this->lang->line('name'); ?> *</label> <div class="form-group">
<input type="text" id="category-name" class="span12 required" /> <label for="category-name"><?php echo $this->lang->line('name'); ?> *</label>
<input type="text" id="category-name" class="form-control required" />
<label for="category-description"><?php echo $this->lang->line('description'); ?></label> </div>
<textarea id="category-description" rows="4" class="span12"></textarea>
<div class="form-group">
<label for="category-description"><?php echo $this->lang->line('description'); ?></label>
<textarea id="category-description" rows="4" class="form-control"></textarea>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -398,6 +398,8 @@ body .form-horizontal .controls {
#services-page .nav { #services-page .nav {
margin: 15px; margin: 15px;
background-color: #F4F4F4;
border-radius: 4px;
} }
#services-page .nav li { #services-page .nav li {