Completed
Pull Request — master (#21)
by Lars
14:31
created
src/Intraface/modules/cms/Controller/templates/pages.tpl.php 1 patch
Braces   +30 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,20 +6,29 @@  discard block
 block discarded – undo
6 6
         <?php e(t('you have to create a template')); ?>
7 7
         <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) : ?>
8 8
             <a href="<?php e(url('../template/create')); ?>"><?php e(t('create template')); ?></a>.
9
-        <?php else : ?>
10
-            <strong><?php e(t('you cannot create templates')); ?></strong>
9
+        <?php else {
10
+    : ?>
11
+            <strong><?php e(t('you cannot create templates'));
12
+}
13
+?></strong>
11 14
         <?php endif; ?>
12 15
     </p>
13 16
 
14
-<?php else : ?>
17
+<?php else {
18
+    : ?>
15 19
 
16 20
 <ul class="options">
17 21
     <?php foreach ($cmspage->getTypes() as $page_type) : ?>
18 22
         <li>
19 23
             <?php if ($page_type == $type) : ?>
20
-                <strong><?php e(t($page_types_plural[$page_type])); ?></strong>
21
-            <?php else : ?>
22
-                <a  href="<?php e(url(null, array('type' => $page_type))); ?>"><?php e(t($page_types_plural[$page_type])); ?></a>
24
+                <strong><?php e(t($page_types_plural[$page_type]));
25
+}
26
+?></strong>
27
+            <?php else {
28
+    : ?>
29
+                <a  href="<?php e(url(null, array('type' => $page_type)));
30
+}
31
+?>"><?php e(t($page_types_plural[$page_type])); ?></a>
23 32
             <?php endif; ?>
24 33
         </li>
25 34
     <?php endforeach; ?>
@@ -34,22 +43,31 @@  discard block
 block discarded – undo
34 43
     <?php
35 44
     if (!is_array($pages) or count($pages) == 0) : ?>
36 45
         <p><?php e(t('No pages found')); ?></p>
37
-    <?php                                                                                                         else: ?>
38
-        <?php include 'page/pages.tpl.php'; ?>
46
+    <?php                                                                                                         else {
47
+    : ?>
48
+        <?php include 'page/pages.tpl.php';
49
+}
50
+?>
39 51
     <?php endif; ?>
40 52
 <?php elseif ($type == 'article') : ?>
41 53
     <?php
42 54
     if (!is_array($articles) or count($articles) == 0) : ?>
43 55
         <p><?php e(t('No articles found')); ?></p>
44
-    <?php                                                                                                         else: ?>
45
-        <?php include 'page/articles.tpl.php'; ?>
56
+    <?php                                                                                                         else {
57
+    : ?>
58
+        <?php include 'page/articles.tpl.php';
59
+}
60
+?>
46 61
     <?php endif; ?>
47 62
 <?php elseif ($type == 'news') : ?>
48 63
     <?php
49 64
     if (!is_array($news) or count($news) == 0) : ?>
50 65
         <p><?php e(t('No news found')); ?></p>
51
-    <?php                                                                                                         else: ?>
52
-        <?php include 'page/news.tpl.php'; ?>
66
+    <?php                                                                                                         else {
67
+    : ?>
68
+        <?php include 'page/news.tpl.php';
69
+}
70
+?>
53 71
     <?php endif; ?>
54 72
 <?php endif; ?>
55 73
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/navigation.tpl.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,9 +55,12 @@
 block discarded – undo
55 55
 <?php if (isset($product_id)) : ?>
56 56
     <input type="hidden" name="product_id" value="<?php e($product_id); ?>" />
57 57
     <input type="submit" name="append_product" value="<?php e(t('Select')); ?>" />
58
-<?php else : ?>
58
+<?php else {
59
+    : ?>
59 60
     <select name="action">
60
-        <option value=""><?php e(t('Choose...')); ?></option>
61
+        <option value=""><?php e(t('Choose...'));
62
+}
63
+?></option>
61 64
         <option value="delete"><?php e(t('Delete selected')); ?></option>
62 65
     </select>
63 66
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/page-edit.tpl.php 1 patch
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,14 +15,20 @@  discard block
 block discarded – undo
15 15
         <?php e(t('you have to create a template for this page type')); ?>
16 16
         <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) : ?>
17 17
             <a href="<?php e(url('../../template/create')); ?>"><?php e(t('create template')); ?></a>.
18
-        <?php else : ?>
19
-            <strong><?php e(t('please ask your administrator to do create a template')); ?></strong>
18
+        <?php else {
19
+    : ?>
20
+            <strong><?php e(t('please ask your administrator to do create a template'));
21
+}
22
+?></strong>
20 23
         <?php endif; ?>
21 24
     </p>
22 25
 
23
-<?php else : ?>
26
+<?php else {
27
+    : ?>
24 28
 
25
-    <form method="post" action="<?php e(url(null, array($context->subview(), 'type' => $type))); ?>">
29
+    <form method="post" action="<?php e(url(null, array($context->subview(), 'type' => $type)));
30
+}
31
+?>">
26 32
 
27 33
         <fieldset>
28 34
             <legend><?php e(t('about the behavior of the page')); ?></legend>
@@ -55,8 +61,11 @@  discard block
 block discarded – undo
55 61
                     <?php endforeach; ?>
56 62
                     </select>
57 63
                 </div>
58
-            <?php else : ?>
59
-                <input type="hidden" name="template_id" value="<?php e($templates[0]['id']); ?>" />
64
+            <?php else {
65
+    : ?>
66
+                <input type="hidden" name="template_id" value="<?php e($templates[0]['id']);
67
+}
68
+?>" />
60 69
             <?php endif; ?>
61 70
         </fieldset>
62 71
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/templates.tpl.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,9 +7,12 @@
 block discarded – undo
7 7
 
8 8
 <?php if (count($templates) == 0) : ?>
9 9
     <p><?php e(t('No templates found')); ?></p>
10
-<?php else : ?>
10
+<?php else {
11
+    : ?>
11 12
 <table>
12
-<caption><?php e(t('Templates')); ?></caption>
13
+<caption><?php e(t('Templates'));
14
+}
15
+?></caption>
13 16
 <thead>
14 17
 <tr>
15 18
     <th><?php e(t('Template name')); ?></th>
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/page.tpl.php 1 patch
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,8 +14,11 @@  discard block
 block discarded – undo
14 14
 <fieldset class="<?php e($cmspage->getStatus()); ?>"><?php if (!$cmspage->isPublished()) : ?>
15 15
         <?php e(t('this page is not published')); ?> <input type="submit"
16 16
     value="<?php e(t('publish now')); ?>" name="publish" /> <?php
17
-else : ?>
18
-        <?php e(t('this page is published')); ?> <input type="submit"
17
+else {
18
+    : ?>
19
+        <?php e(t('this page is published'));
20
+}
21
+?> <input type="submit"
19 22
     value="<?php e(t('set as draft')); ?>" name="unpublish" /> <?php
20 23
 endif; ?>
21 24
 <input type="hidden" value="<?php e($cmspage->get('id')); ?>" name="id" />
@@ -29,14 +32,19 @@  discard block
 block discarded – undo
29 32
         <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) :
30 33
 ?> <a
31 34
     href="<?php e(url('../../template/' . $cmspage->get('template_id'))); ?>"><?php e(t('edit template')); ?></a>.
32
-    <?php else :
33
-?> <strong><?php echo e(t('you cannot edit templates')); ?></strong>
35
+    <?php else {
36
+    :
37
+?> <strong><?php echo e(t('you cannot edit templates'));
38
+}
39
+?></strong>
34 40
     <?php endif; ?></p>
35
-    <?php else : ?>
41
+    <?php else {
42
+    : ?>
36 43
 
37 44
     <?php
38 45
     if (!empty($context->error) and is_array($context->error) and array_key_exists($section->get('id'), $context->error)) {
39 46
         echo '<p class="error">'.e(t('error in a section - please see below')).'</p>';
47
+}
40 48
     }
41 49
     ?>
42 50
 
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/index.tpl.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,12 @@
 block discarded – undo
6 6
 
7 7
 <?php if (is_array($sites) and count($sites) == 0) : ?>
8 8
     <p><?php e(t('no sites created')); ?></p>
9
-<?php else : ?>
9
+<?php else {
10
+    : ?>
10 11
 <table>
11
-<caption><?php e(t('Sites')); ?></caption>
12
+<caption><?php e(t('Sites'));
13
+}
14
+?></caption>
12 15
 <thead>
13 16
     <tr>
14 17
         <th><?php e(t('Name')); ?></th>
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/site.tpl.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,15 +17,21 @@
 block discarded – undo
17 17
         <?php e(t('you have to create a template')); ?>
18 18
         <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) : ?>
19 19
             <a href="<?php e(url('templates', array('create'))); ?>"><?php e(t('create template')); ?></a>.
20
-        <?php else : ?>
21
-            <strong><?php e(t('please ask your administrator to do that')); ?></strong>
20
+        <?php else {
21
+    : ?>
22
+            <strong><?php e(t('please ask your administrator to do that'));
23
+}
24
+?></strong>
22 25
         <?php endif; ?>
23 26
     </p>
24 27
 
25
-<?php else : ?>
28
+<?php else {
29
+    : ?>
26 30
 
27 31
 <div class="message">
28
-    <p><?php e(t('your website can consist of the following types of content:')); ?></p>
32
+    <p><?php e(t('your website can consist of the following types of content:'));
33
+}
34
+?></p>
29 35
     <ul>
30 36
         <li><?php e(t('pages are your common structure on the website reflecting the navigation on the website. pages can be hierarchically ordered.')); ?></li>
31 37
         <li><?php e(t('articles are categorized content which is often persistent. you can categorized it with the use of keywords')); ?></li>
Please login to merge, or discard this patch.
src/Intraface/modules/cms/Controller/templates/section-html.tpl.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,11 @@  discard block
 block discarded – undo
3 3
 <ul class="options">
4 4
     <?php if (count($section->cmspage->getSections()) > 1) : ?>
5 5
     <li><a href="<?php e(url('../')); ?>"><?php e(t('close')); ?></a></li>
6
-    <?php else : ?>
7
-    <li><a class="edit" href="<?php e(url('../../', array('edit'))); ?>"><?php e(t('edit page settings')); ?></a></li>
6
+    <?php else {
7
+    : ?>
8
+    <li><a class="edit" href="<?php e(url('../../', array('edit')));
9
+}
10
+?>"><?php e(t('edit page settings')); ?></a></li>
8 11
     <li><a href="<?php e(url('../../../', array('type' =>$section->cmspage->get('type')))); ?>"><?php e(t('close')); ?></a></li>
9 12
     <?php endif; ?>
10 13
 </ul>
@@ -14,8 +17,11 @@  discard block
 block discarded – undo
14 17
     <?php if (!$section->cmspage->isPublished()) : ?>
15 18
     <?php e('this page is not published'); ?>
16 19
     <input type="submit" value="<?php e(t('publish now')); ?>" name="publish" />
17
-    <?php else : ?>
18
-    <?php e('this page is published'); ?>
20
+    <?php else {
21
+    : ?>
22
+    <?php e('this page is published');
23
+}
24
+?>
19 25
     <input type="submit" value="<?php e(t('set as draft')); ?>" name="unpublish" />
20 26
     <?php endif; ?>
21 27
     <input type="hidden" value="<?php e($section->get('id')); ?>" name="id" />
Please login to merge, or discard this patch.
src/Intraface/modules/email/Controller/templates/index.tpl.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,9 +10,12 @@  discard block
 block discarded – undo
10 10
 
11 11
     <p><?php e(t('no e-mails has been sent')); ?></p>
12 12
 
13
-<?php else : ?>
13
+<?php else {
14
+    : ?>
14 15
     <?php if ($queue > 0) : ?>
15
-        <p><?php e(t('E-mails are in queue - the will be sent soon')); ?></p>
16
+        <p><?php e(t('E-mails are in queue - the will be sent soon'));
17
+}
18
+?></p>
16 19
     <?php endif; ?>
17 20
 
18 21
     <?php echo $gateway->getDBQuery()->display('character'); ?>
@@ -37,8 +40,11 @@  discard block
 block discarded – undo
37 40
         <?php if (!empty($email['status']) and $email['status'] != 'sent') : ?>
38 41
             <a class="edit" href="<?php e(url($email['id'], array('edit'))); ?>"><?php e(t('edit')); ?></a>
39 42
             <a class="delete" href="<?php e(url($email['id'], array('delete'))); ?>"><?php e(t('delete')); ?></a>
40
-        <?php else : ?>
41
-            <?php e(t($email['status'])); ?>
43
+        <?php else {
44
+    : ?>
45
+            <?php e(t($email['status']));
46
+}
47
+?>
42 48
         <?php endif; ?>
43 49
         </td>
44 50
     </tr>
Please login to merge, or discard this patch.