changing quotenik css color scheme
This commit is contained in:
parent
718ad07f97
commit
6fafd98b21
|
|
@ -22,6 +22,7 @@ class EnquiriesController extends AppController {
|
||||||
$status_list[] = array($status['Status']['id'], $status['Status']['name']);
|
$status_list[] = array($status['Status']['id'], $status['Status']['name']);
|
||||||
}
|
}
|
||||||
$this->set('status_list', $status_list);
|
$this->set('status_list', $status_list);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function view($id = null) {
|
function view($id = null) {
|
||||||
|
|
|
||||||
63
controllers/product_categories_controller.php
Normal file
63
controllers/product_categories_controller.php
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
class ProductCategoriesController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'ProductCategories';
|
||||||
|
var $helpers = array('Html', 'Form');
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->ProductCategory->recursive = 0;
|
||||||
|
$this->set('productCategories', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid ProductCategory.', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->set('productCategory', $this->ProductCategory->read(null, $id));
|
||||||
|
$this->set('products', $this->ProductCategory->Product->findAllByProductCategoryId($id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->ProductCategory->create();
|
||||||
|
if ($this->ProductCategory->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The ProductCategory has been saved', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The ProductCategory could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid ProductCategory', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->ProductCategory->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The ProductCategory has been saved', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The ProductCategory could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->ProductCategory->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for ProductCategory', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->ProductCategory->del($id)) {
|
||||||
|
$this->Session->setFlash(__('ProductCategory deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
@ -3,7 +3,7 @@ class ProductsController extends AppController {
|
||||||
|
|
||||||
var $name = 'Products';
|
var $name = 'Products';
|
||||||
var $components = array('RequestHandler');
|
var $components = array('RequestHandler');
|
||||||
var $helpers = array('Html', 'Form', 'Ajax', 'Number');
|
var $helpers = array('Html', 'Form', 'Ajax', 'Number', 'Fck');
|
||||||
|
|
||||||
function index() {
|
function index() {
|
||||||
$this->Product->recursive = 0;
|
$this->Product->recursive = 0;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ class Enquiry extends AppModel {
|
||||||
/*Custom Validation Rule to Check that Enquiries with Australian States are assigned to Australia.
|
/*Custom Validation Rule to Check that Enquiries with Australian States are assigned to Australia.
|
||||||
* and that Overseas enquiries are NOT assigned to Australia.
|
* and that Overseas enquiries are NOT assigned to Australia.
|
||||||
* Not Portable at all. This code is only for CMC usage
|
* Not Portable at all. This code is only for CMC usage
|
||||||
|
* Should probably change this to use RegExes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function checkStates($data) {
|
function checkStates($data) {
|
||||||
|
|
@ -95,8 +96,6 @@ class Enquiry extends AppModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
var $belongsTo = array(
|
var $belongsTo = array(
|
||||||
'User' => array('className' => 'User',
|
'User' => array('className' => 'User',
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,14 @@ foreach ($enquiries as $enquiry):
|
||||||
echo date('j M Y',$time->toUnix($enquiry['Enquiry']['created'])); ?>
|
echo date('j M Y',$time->toUnix($enquiry['Enquiry']['created'])); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="principlename">
|
<td class="principlename">
|
||||||
<?php echo $html->link($enquiry['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $enquiry['Principle']['id'])); ?>
|
<?php
|
||||||
|
if($enquiry['Principle']['short_name']) {
|
||||||
|
echo $html->link($enquiry['Principle']['short_name'], array('controller'=> 'principles', 'action'=>'view', $enquiry['Principle']['id']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo $html->link($enquiry['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $enquiry['Principle']['id']));
|
||||||
|
}
|
||||||
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php echo $html->link($enquiry['Enquiry']['title'], array('controller'=>'enquiries', 'action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
<?php echo $html->link($enquiry['Enquiry']['title'], array('controller'=>'enquiries', 'action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
||||||
|
|
@ -98,7 +105,7 @@ foreach ($enquiries as $enquiry):
|
||||||
<? //BCC address to Con is hardcoded in here. ?>
|
<? //BCC address to Con is hardcoded in here. ?>
|
||||||
<?php echo $html->link($enquiry['Contact']['email'], 'mailto:'.$enquiry['Contact']['email'].'?subject='.$enquiry['Enquiry']['title'].'&bcc=carpis@cmctechnologies.com.au'); ?>
|
<?php echo $html->link($enquiry['Contact']['email'], 'mailto:'.$enquiry['Contact']['email'].'?subject='.$enquiry['Enquiry']['title'].'&bcc=carpis@cmctechnologies.com.au'); ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="contactemail">
|
||||||
<?php echo $enquiry['Contact']['phone']; ?>
|
<?php echo $enquiry['Contact']['phone']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
@ -109,6 +116,7 @@ foreach ($enquiries as $enquiry):
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
<td class="comments">
|
<td class="comments">
|
||||||
|
<div id="comment_<?php echo $i; ?>">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$displayedComment = substr($enquiry['Enquiry']['comments'], 0, 60);
|
$displayedComment = substr($enquiry['Enquiry']['comments'], 0, 60);
|
||||||
|
|
@ -117,6 +125,7 @@ foreach ($enquiries as $enquiry):
|
||||||
echo '.... '.$html->link('view all', array('controller'=>'enquiries', 'action'=>'view', $enquiry['Enquiry']['id']));
|
echo '.... '.$html->link('view all', array('controller'=>'enquiries', 'action'=>'view', $enquiry['Enquiry']['id']));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="viewedit">
|
<td class="viewedit">
|
||||||
<?php echo $html->link(__('View', true), array('controller'=>'enquiries','action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
<?php echo $html->link(__('View', true), array('controller'=>'enquiries','action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,8 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<?php // echo $html->image("cmclogo.png");
|
<?php echo $html->image("cmclogosmall.png");
|
||||||
?>
|
?>
|
||||||
<h1>CMC Technologies</h1>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="username">
|
<div id="username">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<legend><?php __('Add Principle');?></legend>
|
<legend><?php __('Add Principle');?></legend>
|
||||||
<?php
|
<?php
|
||||||
echo $form->input('name');
|
echo $form->input('name');
|
||||||
|
echo $form->input('short_name');
|
||||||
echo $form->input('code');
|
echo $form->input('code');
|
||||||
echo $form->input('address');
|
echo $form->input('address');
|
||||||
echo $form->input('city');
|
echo $form->input('city');
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
<?php
|
<?php
|
||||||
echo $form->input('id');
|
echo $form->input('id');
|
||||||
echo $form->input('name');
|
echo $form->input('name');
|
||||||
|
echo $form->input('short_name');
|
||||||
echo $form->input('code');
|
echo $form->input('code');
|
||||||
echo $form->input('address');
|
echo $form->input('address');
|
||||||
echo $form->input('city');
|
echo $form->input('city');
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@
|
||||||
<?php echo $principle['Principle']['name']; ?>
|
<?php echo $principle['Principle']['name']; ?>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Short Name'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $principle['Principle']['short_name']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Code'); ?></dt>
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Code'); ?></dt>
|
||||||
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
<?php echo $principle['Principle']['code']; ?>
|
<?php echo $principle['Principle']['code']; ?>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<?php echo $javascript->link('quotenik/product_buildup.js', false); ?>
|
<?php echo $javascript->link('quotenik/product_buildup.js', false); ?>
|
||||||
<?php echo $javascript->link('tiny_mce/tiny_mce', false); ?>
|
|
||||||
<?php echo $javascript->link('tiny_mce/tiny_init', false); ?>
|
|
||||||
<div class="addproduct">
|
<div class="addproduct">
|
||||||
<?php echo $form->create('Product', array('id'=>'productaddform', 'class'=>'addproduct'));?>
|
<?php echo $form->create('Product', array('id'=>'productaddform', 'class'=>'addproduct'));?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
@ -8,14 +7,15 @@
|
||||||
<?php
|
<?php
|
||||||
echo $form->input('principle_id');
|
echo $form->input('principle_id');
|
||||||
echo $form->input('title');
|
echo $form->input('title');
|
||||||
echo $form->input('description');
|
echo $fck->fckeditor(array('Product', 'description'), '');
|
||||||
|
//echo $form->input('description');
|
||||||
echo $form->input('part_number');
|
echo $form->input('part_number');
|
||||||
echo $form->input('product_category_id');
|
echo $form->input('product_category_id');
|
||||||
echo $ajax->link('Enter Costing Info', array('controller'=> 'products', 'action' => 'add_costing'), array( 'update' => 'costingdetails'));
|
echo $ajax->link('Enter Costing Info', array('controller'=> 'products', 'action' => 'add_costing'), array( 'update' => 'costingdetails'));
|
||||||
echo '<div id="costingdetails">';
|
echo '<div id="costingdetails">';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo $form->input('notes');
|
echo $form->input('notes');
|
||||||
echo $ajax->observeForm('productaddform', array('frequency' => 0.5, 'complete'=>'buildup()'));
|
|
||||||
?>
|
?>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php echo $form->end('Submit');?>
|
<?php echo $form->end('Submit');?>
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,14 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Title</th>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<ul>
|
<ul>
|
||||||
<li><?php echo $html->link(__('Edit Product', true), array('action'=>'edit', $product['Product']['id'])); ?> </li>
|
<li><?php echo $html->link(__('Edit Product', true), array('action'=>'edit', $product['Product']['id'])); ?> </li>
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,11 @@ h2 {
|
||||||
margin: 0.3em 0;
|
margin: 0.3em 0;
|
||||||
padding-top: 0.8em;
|
padding-top: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.headerlinks {
|
||||||
|
color: #EE3322;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
h3 {
|
h3 {
|
||||||
color: #2C5FD5;
|
color: #2C5FD5;
|
||||||
font-family:'Gill Sans','lucida grande',helvetica, arial, sans-serif;
|
font-family:'Gill Sans','lucida grande',helvetica, arial, sans-serif;
|
||||||
|
|
@ -98,7 +103,7 @@ ul.principle-emails {
|
||||||
}
|
}
|
||||||
|
|
||||||
#header{
|
#header{
|
||||||
/* padding: 10px 20px; */
|
padding-bottom: 10px;
|
||||||
background: #366FA4;
|
background: #366FA4;
|
||||||
}
|
}
|
||||||
#header h1 {
|
#header h1 {
|
||||||
|
|
@ -652,7 +657,7 @@ div.addproduct {
|
||||||
form.addproduct {
|
form.addproduct {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 30%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue