Completed
Pull Request — master (#24)
by Lars
12:05
created
src/Intraface/modules/product/Controller/tpl/show.tpl.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,10 +128,12 @@  discard block
 block discarded – undo
128 128
         <ul class="options">
129 129
             <li><a href="<?php e(url('variations/select_attribute_groups')); ?>"><?php e(t('Select attributes for product')); ?></a></li>
130 130
         </ul>
131
-    <?php else : ?>
131
+    <?php else {
132
+    : ?>
132 133
         <?php
133 134
         try {
134 135
             $variations = $product->getVariations();
136
+}
135 137
             $variation_is_present = true;
136 138
         } catch (Intraface_Gateway_Exception $e) {
137 139
             $variation_is_present = false;
@@ -142,9 +144,12 @@  discard block
 block discarded – undo
142 144
             <ul class="options">
143 145
                 <li><a href="<?php e(url('variations', array('edit'))); ?>"><?php e(t('Create variations for the product')); ?></a></li>
144 146
             </ul>
145
-        <?php else : ?>
147
+        <?php else {
148
+    : ?>
146 149
 
147
-            <table summary="<?php e(t('Variations')); ?>" id="variations_table" class="stripe">
150
+            <table summary="<?php e(t('Variations'));
151
+}
152
+?>" id="variations_table" class="stripe">
148 153
                 <caption><?php e(t('Variations')); ?></caption>
149 154
                 <thead>
150 155
                     <tr>
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/tpl/index.tpl.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,9 +13,12 @@  discard block
 block discarded – undo
13 13
 
14 14
 <?php if (!$context->getProduct()->isFilledIn()) : ?>
15 15
     <p><?php e(t('No products has been created.')); ?> <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('create product')); ?></a>.</p>
16
-<?php else : ?>
16
+<?php else {
17
+    : ?>
17 18
 
18
-<form action="<?php e(url()); ?>" method="get" class="search-filter">
19
+<form action="<?php e(url());
20
+}
21
+?>" method="get" class="search-filter">
19 22
     <fieldset>
20 23
         <legend><?php e(t('Search')); ?></legend>
21 24
         <!--
@@ -65,9 +68,12 @@  discard block
 block discarded – undo
65 68
 
66 69
     <?php if (count($context->getProducts()) == 0) : ?>
67 70
         <p><?php e(t('no products in search')); ?>.</p>
68
-    <?php else : ?>
71
+    <?php else {
72
+    : ?>
69 73
 
70
-    <table summary="<?php e(t('products')); ?>" id="product_table" class="stripe">
74
+    <table summary="<?php e(t('products'));
75
+}
76
+?>" id="product_table" class="stripe">
71 77
         <caption><?php e(t('products')); ?> (<?php e(t('prices excl. vat')); ?>)</caption>
72 78
         <thead>
73 79
             <tr>
Please login to merge, or discard this patch.
Intraface/modules/product/Controller/tpl/select-attribute-groups.tpl.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,11 @@
 block discarded – undo
15 15
 
16 16
 <?php if ($groups->count() == 0) : ?>
17 17
     <p><?php e(t('No attribute groups has been created.')); ?> <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create attribute group')); ?></a>.</p>
18
-<?php else : ?>
18
+<?php else {
19
+    : ?>
19 20
 
20
-    <?php echo $content; ?>
21
+    <?php echo $content;
22
+}
23
+?>
21 24
 
22 25
 <?php endif; ?>
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/tpl/variations.tpl.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,8 +54,10 @@
 block discarded – undo
54 54
                         </td>
55 55
                         <td><?php if ($variation !== null) :
56 56
                             e($variation->getNumber());
57
-else :
57
+else {
58
+    :
58 59
     e('-');
60
+}
59 61
 endif; ?>
60 62
                         </td>
61 63
                         <td>
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/tpl/selectproductvariation.tpl.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,8 +6,11 @@  discard block
 block discarded – undo
6 6
 
7 7
 <?php if (count($variations) == 0) : ?>
8 8
     <p><?php e(t('No variations created for the product')); ?>.</p>
9
-<?php else : ?>
10
-    <form action="<?php e(url(null)); ?>" method="post">
9
+<?php else {
10
+    : ?>
11
+    <form action="<?php e(url(null));
12
+}
13
+?>" method="post">
11 14
         <input type="hidden" name="product_id" value="<?php e($product->getId()); ?>" />
12 15
         <input type="hidden" name="set_quantity" value="<?php e($context->quantity); ?>" />
13 16
         <table summary="<?php e(t('Variations')); ?>" id="variations_table" class="stripe">
@@ -16,8 +19,10 @@  discard block
 block discarded – undo
16 19
                 <tr>
17 20
                     <th><?php if ($context->multiple && $context->quantity) :
18 21
                         e(t('Quantity'));
19
-else :
22
+else {
23
+    :
20 24
     echo e(t('Choose'));
25
+}
21 26
 endif; ?></th>
22 27
                     <th>#</th>
23 28
                     <th><?php e(t('Variation')); ?></th>
Please login to merge, or discard this patch.
src/Intraface/modules/product/Controller/tpl/selectproduct.tpl.php 1 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 1 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/newsletter/Controller/templates/subscribers.tpl.php 1 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/letters.tpl.php 1 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.