Completed
Pull Request — master (#21)
by Lars
14:31
created
src/Intraface/modules/product/Controller/tpl/selectproduct.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
                 <tr>
66 66
                     <td>
67 67
                         <?php if ($p['has_variation']) : ?>
68
-                            <a href="<?php e(url($p['id'] . '/selectvariation', array('set_quantity' => $context->quantity, 'multiple' => $context->multiple))); ?>" /><?php echo '<img class="variation" src="/images/icons/silk/table_multiple.png" title="'.t("See the product's variations").'"/> '; ?></a>
68
+                            <a href="<?php e(url($p['id'].'/selectvariation', array('set_quantity' => $context->quantity, 'multiple' => $context->multiple))); ?>" /><?php echo '<img class="variation" src="/images/icons/silk/table_multiple.png" title="'.t("See the product's variations").'"/> '; ?></a>
69 69
                         <?php elseif ($context->multiple && $context->quantity) : ?>
70 70
                             <input id="<?php e($p['id']); ?>" type="text" name="selected[<?php e($p['id']); ?>]" value="<?php if (isset($selected_products[$p['id']])) :
71 71
                                 e($selected_products[$p['id']]);
Please login to merge, or discard this patch.
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,10 +7,13 @@  discard block
 block discarded – undo
7 7
 
8 8
 <?php if ($context->getProduct()->isFilledIn() == 0) : ?>
9 9
     <p><?php e(t('No products to select.')); ?> <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create product')); ?></a>.</p>
10
-<?php else : ?>
10
+<?php else {
11
+    : ?>
11 12
 
12 13
     <ul class="options">
13
-        <li><a href="<?php e(url('../')); ?>"><?php e(t('Close')); ?></a></li>
14
+        <li><a href="<?php e(url('../'));
15
+}
16
+?>"><?php e(t('Close')); ?></a></li>
14 17
         <li><a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create')); ?></a></li>
15 18
     </ul>
16 19
 
@@ -47,8 +50,10 @@  discard block
 block discarded – undo
47 50
                 <tr>
48 51
                     <th><?php if ($context->multiple && $context->quantity) :
49 52
                         e(t('Quantity'));
50
-else :
53
+else {
54
+    :
51 55
     echo e(t('Choose'));
56
+}
52 57
 endif; ?></th>
53 58
                     <th><?php e(t('Product number')); ?></th>
54 59
                     <th><?php e(t('Name')); ?></th>
@@ -69,8 +74,10 @@  discard block
 block discarded – undo
69 74
                         <?php elseif ($context->multiple && $context->quantity) : ?>
70 75
                             <input id="<?php e($p['id']); ?>" type="text" name="selected[<?php e($p['id']); ?>]" value="<?php if (isset($selected_products[$p['id']])) :
71 76
                                 e($selected_products[$p['id']]);
72
-else :
77
+else {
78
+    :
73 79
     e('0');
80
+}
74 81
 endif; ?>" size="2" />
75 82
                         <?php elseif ($context->multiple && !$context->quantity) : ?>
76 83
                             <input id="<?php e($p['id']); ?>" type="checkbox" name="selected[<?php e($p['id']); ?>]" value="1" <?php if (array_key_exists($p['id'], $selected_products)) {
@@ -95,8 +102,10 @@  discard block
 block discarded – undo
95 102
     e('...');
96 103
 elseif (isset($p['stock_status']['for_sale'])) :
97 104
     e($p['stock_status']['for_sale']);
98
-else :
105
+else {
106
+    :
99 107
     echo 0;
108
+}
100 109
 endif; ?></td>
101 110
                     <?php endif; ?>
102 111
                     <td><?php if ($p['vat'] == 1) {
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/tpl/edit.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
         $year->loadActiveYear();
153 153
 
154 154
         $account = new Account($year);
155
-        $accounts =  $account->getList('sale');
155
+        $accounts = $account->getList('sale');
156 156
 
157 157
     ?>
158 158
     <fieldset>
Please login to merge, or discard this patch.
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,8 +14,10 @@  discard block
 block discarded – undo
14 14
             <label for="number"><?php e(t('Product number')); ?></label>
15 15
             <input type="text" name="number" id="number" value="<?php if (isset($product)) :
16 16
                 e($product->getDetails()->getNumber());
17
-else :
17
+else {
18
+    :
18 19
     e($context->getGateway()->getMaxNumber() + 1);
20
+}
19 21
 endif; ?>" />
20 22
         </div>
21 23
         <div class="formrow">
@@ -94,9 +96,12 @@  discard block
 block discarded – undo
94 96
                         <?php endforeach; ?>
95 97
                     </select>
96 98
                 </div>
97
-            <?php else : ?>
99
+            <?php else {
100
+    : ?>
98 101
                 <div class="formrow">
99
-                    <label for="has_variation"><?php e(t('Product has variations')); ?></label>
102
+                    <label for="has_variation"><?php e(t('Product has variations'));
103
+}
104
+?></label>
100 105
                     <input type="hidden" name="has_variation" value="<?php if (isset($product)) {
101 106
                         e($product->hasVariation());
102 107
 } ?>" />
@@ -160,10 +165,13 @@  discard block
 block discarded – undo
160 165
 
161 166
         <?php if (count($accounts) == 0) : ?>
162 167
             <p><?php e(t('You will need to create an accounting year and create accounts for that year, to be able to set the account for which this product will be stated.')); ?> <a href="<?php e($mainAccounting->getPath()); ?>"><?php e(t('Create accounting year and accounts')); ?></a></p>
163
-        <?php else : ?>
168
+        <?php else {
169
+    : ?>
164 170
 
165 171
         <div class="formrow">
166
-            <label for="state_account"><?php e(t('State on account')); ?></label>
172
+            <label for="state_account"><?php e(t('State on account'));
173
+}
174
+?></label>
167 175
             <select id="state_account" name="state_account_id">
168 176
                 <option value=""><?php e(t('Choose...')); ?></option>
169 177
                 <?php
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/Selectproductvariation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             'product' => $product
54 54
         );
55 55
 
56
-        $smarty = $this->template->create(dirname(__FILE__) . '/tpl/selectproductvariation');
56
+        $smarty = $this->template->create(dirname(__FILE__).'/tpl/selectproductvariation');
57 57
         return $smarty->render($this, $data);
58 58
     }
59 59
 
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/AttributeGroups.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         $data = array('groups' => $groups);
27 27
 
28
-        $smarty = $this->template->create(dirname(__FILE__) . '/tpl/attributegroups');
28
+        $smarty = $this->template->create(dirname(__FILE__).'/tpl/attributegroups');
29 29
         return $smarty->render($this, $data);
30 30
     }
31 31
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     function renderHtmlCreate()
55 55
     {
56 56
         $data = array();
57
-        $smarty = $this->template->create(dirname(__FILE__) . '/tpl/attributegroup-edit');
57
+        $smarty = $this->template->create(dirname(__FILE__).'/tpl/attributegroup-edit');
58 58
         return $smarty->render($this, $data);
59 59
     }
60 60
 
Please login to merge, or discard this patch.
src/Intraface/modules/language/Languages.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
     {
43 43
         $q = Doctrine_Query::create();
44 44
         $rows = $q->delete()
45
-          ->from('Intraface_modules_language_Languages')
46
-          ->where('intranet_id = ?', $GLOBALS['intraface_doctrine_intranet_id'])
47
-          ->execute();
45
+            ->from('Intraface_modules_language_Languages')
46
+            ->where('intranet_id = ?', $GLOBALS['intraface_doctrine_intranet_id'])
47
+            ->execute();
48 48
         return true;
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/subscribers.tpl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@
 block discarded – undo
49 49
     <tbody>
50 50
     <?php foreach ($context->getSubscribers() as $s) : ?>
51 51
     <tr>
52
-        <td><a href="<?php e(url('../../../../contact/' . $s['contact_id'])); ?>"><?php e($s['contact_name']); ?></a></td>
52
+        <td><a href="<?php e(url('../../../../contact/'.$s['contact_id'])); ?>"><?php e($s['contact_name']); ?></a></td>
53 53
         <td><?php e($s['contact_email']); ?></td>
54 54
         <td><?php e($s['dk_date_submitted']); ?></td>
55 55
         <td>
56
-            <?php if ($s['optin'] == 0 and $s['date_optin_email_sent'] < date('Y-m-d', time() - 60 * 60 * 24 * 3)) : ?>
56
+            <?php if ($s['optin'] == 0 and $s['date_optin_email_sent'] < date('Y-m-d', time() - 60*60*24*3)) : ?>
57 57
                 <a href="<?php e(url($s['id'], array('remind' => 'true', 'use_stored' => 'true'))); ?>"><?php e(t('Remind')); ?></a>
58 58
             <?php elseif ($s['optin'] == 0) : ?>
59 59
                 <?php e(t('Not opted in')); ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,9 +32,12 @@
 block discarded – undo
32 32
 
33 33
 <?php if (count($context->getSubscribers()) == 0) : ?>
34 34
     <p><?php e(t('No subscribers added yet.')); ?></p>
35
-<?php else : ?>
35
+<?php else {
36
+    : ?>
36 37
 
37
-    <?php echo $context->getSubscriber()->getDBQuery()->display('character'); ?>
38
+    <?php echo $context->getSubscriber()->getDBQuery()->display('character');
39
+}
40
+?>
38 41
 <table class="stripe">
39 42
     <caption><?php e(t('Letters')); ?></caption>
40 43
     <thead>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/list-edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 
69 69
 
70 70
     <div style="clear: both;">
71
-        <p><?php e(t('Either you are using this link')); ?> <strong><?php e('http://' . $context->getKernel()->setting->get('intranet', 'contact.login_url') . '/' .$context->getKernel()->intranet->get('identifier') . '/login'); ?></strong> <?php e(t('or you can write your own')); ?>:</p>
71
+        <p><?php e(t('Either you are using this link')); ?> <strong><?php e('http://'.$context->getKernel()->setting->get('intranet', 'contact.login_url').'/'.$context->getKernel()->intranet->get('identifier').'/login'); ?></strong> <?php e(t('or you can write your own')); ?>:</p>
72 72
         <label for="optin_link"><?php e(t('Link for the optin page')); ?></label><br />
73 73
         <input type="text" name="optin_link" value="<?php if (!empty($value['optin_link'])) {
74 74
             e($value['optin_link']);
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/letters.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         </td>
38 38
         <td class="buttons">
39 39
             <?php if ($letter['status'] != 'sent') : ?>
40
-                <a href="<?php e(url($letter['id'] . '/send')); ?>"><?php e(t('Send')); ?></a>
40
+                <a href="<?php e(url($letter['id'].'/send')); ?>"><?php e(t('Send')); ?></a>
41 41
                 <a class="edit" href="<?php e(url($letter['id'], array('edit'))); ?>"><?php e(t('Edit')); ?></a>
42 42
                 <a class="delete" href="<?php e(url($letter['id'], array('delete'))); ?>"><?php e(t('Delete')); ?></a>
43 43
             <?php endif; ?>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,9 +10,12 @@  discard block
 block discarded – undo
10 10
 
11 11
 <?php if (count($context->getLetters()) == 0) : ?>
12 12
     <p><?php e(t('No letters has been created.')); ?></p>
13
-<?php else : ?>
13
+<?php else {
14
+    : ?>
14 15
 <table class="stripe">
15
-    <caption><?php e(t('Letters')); ?></caption>
16
+    <caption><?php e(t('Letters'));
17
+}
18
+?></caption>
16 19
     <thead>
17 20
     <tr>
18 21
         <th><?php e(t('Subject')); ?></th>
@@ -30,8 +33,10 @@  discard block
 block discarded – undo
30 33
             <?php
31 34
             if ($letter['status'] == 'sent') :
32 35
                 e($letter['sent_to_receivers']);
33
-            else :
36
+            else {
37
+                :
34 38
                     e(t('Not sent'));
39
+            }
35 40
             endif;
36 41
             ?>
37 42
         </td>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/list.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     </tr>
27 27
     <tr>
28 28
         <th><?php e(t('Email sender name')); ?></th>
29
-        <td><?php e($value['sender_name']); ?> <?php echo htmlspecialchars('<' . $value['reply_email'] . '>'); ?></td>
29
+        <td><?php e($value['sender_name']); ?> <?php echo htmlspecialchars('<'.$value['reply_email'].'>'); ?></td>
30 30
     </tr>
31 31
 <!--
32 32
     <tr>
Please login to merge, or discard this patch.