@@ -122,7 +122,7 @@ |
||
122 | 122 | } |
123 | 123 | $context->getKernel()->useModule('filemanager'); |
124 | 124 | $filehandler = new FileHandler($kernel, $value['pic_id']); |
125 | - e('file_id ' . $filehandler->get('id') . ' chosen'); |
|
125 | + e('file_id '.$filehandler->get('id').' chosen'); |
|
126 | 126 | //$filehandler_html = new FileHandlerHTML($filehandler); |
127 | 127 | //$filehandler_html->printFormUploadTag('pic_id', 'new_pic', 'choose_file', array('image_size' => 'small')); |
128 | 128 | ?> |
@@ -15,14 +15,20 @@ discard block |
||
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 |
||
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 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | <?php foreach ($templates as $s) : ?> |
28 | 28 | <tr> |
29 | - <td><a href="<?php e(url($s['id'])); ?>"><?php e($s['name']); ?></a></td> |
|
29 | + <td><a href="<?php e(url($s['id'])); ?>"><?php e($s['name']); ?></a></td> |
|
30 | 30 | <td><?php e($s['identifier']); ?></td> |
31 | 31 | <td> |
32 | 32 | <?php |
@@ -7,9 +7,12 @@ |
||
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> |
@@ -30,8 +30,8 @@ |
||
30 | 30 | <td><?php e($s['type']); ?></td> |
31 | 31 | <td class="options"><a href="<?php e(url(null, array('moveup' => $s['id']))); ?>"><?php e(t('Up')); ?></a> |
32 | 32 | <a href="<?php e(url(null, array('movedown' => $s['id']))); ?>"><?php e(t('Down')); ?></a> |
33 | - <a class="edit" href="<?php e(url('section/' . $s['id'], array('edit'))); ?>"><?php e(t('Edit settings')); ?></a> |
|
34 | - <a class="delete" href="<?php e(url('section/' . $s['id'], array('delete'))); ?>"><?php e(t('Delete')); ?></a></td> |
|
33 | + <a class="edit" href="<?php e(url('section/'.$s['id'], array('edit'))); ?>"><?php e(t('Edit settings')); ?></a> |
|
34 | + <a class="delete" href="<?php e(url('section/'.$s['id'], array('delete'))); ?>"><?php e(t('Delete')); ?></a></td> |
|
35 | 35 | </tr> |
36 | 36 | <?php endforeach; ?> |
37 | 37 | </tbody> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | echo '<fieldset>'; |
63 | 63 | } |
64 | 64 | include 'section/shorttext.tpl.php'; |
65 | - break; |
|
65 | + break; |
|
66 | 66 | case 'longtext': |
67 | 67 | if (!array_key_exists($section->get('id'), $error) and !empty($test) and $test != 'longtext') { |
68 | 68 | echo '</fieldset>'; |
@@ -71,19 +71,19 @@ discard block |
||
71 | 71 | echo '<fieldset>'; |
72 | 72 | } |
73 | 73 | include 'section/longtext.tpl.php'; |
74 | - break; |
|
74 | + break; |
|
75 | 75 | case 'picture': |
76 | 76 | if (!array_key_exists($section->get('id'), $error) and !empty($test)) { |
77 | 77 | echo '</fieldset>'; |
78 | 78 | } |
79 | 79 | include 'section/picture.tpl.php'; |
80 | - break; |
|
80 | + break; |
|
81 | 81 | case 'mixed': |
82 | 82 | if (!array_key_exists($section->get('id'), $error)) { |
83 | 83 | echo '</fieldset>'; |
84 | 84 | } |
85 | 85 | include 'section/mixed.tpl.php'; |
86 | - break; |
|
86 | + break; |
|
87 | 87 | ?> <?php |
88 | 88 | } |
89 | 89 | $test = $section->get('type'); |
@@ -54,37 +54,37 @@ |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | ?> <?php switch ($section->get('type')) { |
57 | - case 'shorttext': |
|
58 | - if (!array_key_exists($section->get('id'), $context->error) and !empty($test) and $test != 'shorttext') { |
|
59 | - echo '</fieldset>'; |
|
60 | - } |
|
61 | - if ($test != 'shorttext') { |
|
62 | - echo '<fieldset>'; |
|
63 | - } |
|
64 | - include 'section/shorttext.tpl.php'; |
|
65 | - break; |
|
66 | - case 'longtext': |
|
67 | - if (!array_key_exists($section->get('id'), $error) and !empty($test) and $test != 'longtext') { |
|
68 | - echo '</fieldset>'; |
|
69 | - } |
|
70 | - if ($test != 'longtext') { |
|
71 | - echo '<fieldset>'; |
|
72 | - } |
|
73 | - include 'section/longtext.tpl.php'; |
|
74 | - break; |
|
75 | - case 'picture': |
|
76 | - if (!array_key_exists($section->get('id'), $error) and !empty($test)) { |
|
77 | - echo '</fieldset>'; |
|
78 | - } |
|
79 | - include 'section/picture.tpl.php'; |
|
80 | - break; |
|
81 | - case 'mixed': |
|
82 | - if (!array_key_exists($section->get('id'), $error)) { |
|
83 | - echo '</fieldset>'; |
|
84 | - } |
|
85 | - include 'section/mixed.tpl.php'; |
|
86 | - break; |
|
87 | - ?> <?php |
|
57 | + case 'shorttext': |
|
58 | + if (!array_key_exists($section->get('id'), $context->error) and !empty($test) and $test != 'shorttext') { |
|
59 | + echo '</fieldset>'; |
|
60 | + } |
|
61 | + if ($test != 'shorttext') { |
|
62 | + echo '<fieldset>'; |
|
63 | + } |
|
64 | + include 'section/shorttext.tpl.php'; |
|
65 | + break; |
|
66 | + case 'longtext': |
|
67 | + if (!array_key_exists($section->get('id'), $error) and !empty($test) and $test != 'longtext') { |
|
68 | + echo '</fieldset>'; |
|
69 | + } |
|
70 | + if ($test != 'longtext') { |
|
71 | + echo '<fieldset>'; |
|
72 | + } |
|
73 | + include 'section/longtext.tpl.php'; |
|
74 | + break; |
|
75 | + case 'picture': |
|
76 | + if (!array_key_exists($section->get('id'), $error) and !empty($test)) { |
|
77 | + echo '</fieldset>'; |
|
78 | + } |
|
79 | + include 'section/picture.tpl.php'; |
|
80 | + break; |
|
81 | + case 'mixed': |
|
82 | + if (!array_key_exists($section->get('id'), $error)) { |
|
83 | + echo '</fieldset>'; |
|
84 | + } |
|
85 | + include 'section/mixed.tpl.php'; |
|
86 | + break; |
|
87 | + ?> <?php |
|
88 | 88 | } |
89 | 89 | $test = $section->get('type'); |
90 | 90 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | href="<?php e(url('../../', array('type' => $cmspage->get('type')))); ?>"><?php e(t('close')); ?></a></li> |
7 | 7 | <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) : ?> |
8 | 8 | <li><a |
9 | - href="<?php e(url('../../../templates/' . $cmspage->get('template_id'))); ?>"><?php e(t('edit template')); ?></a></li> |
|
9 | + href="<?php e(url('../../../templates/'.$cmspage->get('template_id'))); ?>"><?php e(t('edit template')); ?></a></li> |
|
10 | 10 | <?php endif; ?> |
11 | 11 | </ul> |
12 | 12 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | <p class="warning"><?php echo e(t('no sections added to the template')); ?> |
29 | 29 | <?php if ($kernel->user->hasSubAccess('cms', 'edit_templates')) : |
30 | 30 | ?> <a |
31 | - href="<?php e(url('../../template/' . $cmspage->get('template_id'))); ?>"><?php e(t('edit template')); ?></a>. |
|
31 | + href="<?php e(url('../../template/'.$cmspage->get('template_id'))); ?>"><?php e(t('edit template')); ?></a>. |
|
32 | 32 | <?php else : |
33 | 33 | ?> <strong><?php echo e(t('you cannot edit templates')); ?></strong> |
34 | 34 | <?php endif; ?></p> |
@@ -14,8 +14,11 @@ discard block |
||
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 |
||
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 |
@@ -19,11 +19,11 @@ |
||
19 | 19 | <tbody> |
20 | 20 | <?php foreach ($sites as $s) : ?> |
21 | 21 | <tr> |
22 | - <td><a href="<?php e(url($s['id'])); ?>"><?php e($s['name']); ?></a></td> |
|
22 | + <td><a href="<?php e(url($s['id'])); ?>"><?php e($s['name']); ?></a></td> |
|
23 | 23 | <td> |
24 | - <a href="<?php e(url($s['id'] . '/pages', array('type' => 'page'))); ?>"><?php e(t('pages')); ?></a>, |
|
25 | - <a href="<?php e(url($s['id'] . '/pages', array('type' => 'article'))); ?>"><?php e(t('articles')); ?></a>, |
|
26 | - <a href="<?php e(url($s['id'] . '/pages', array('type' => 'news'))); ?>"><?php e(t('news')); ?></a> |
|
24 | + <a href="<?php e(url($s['id'].'/pages', array('type' => 'page'))); ?>"><?php e(t('pages')); ?></a>, |
|
25 | + <a href="<?php e(url($s['id'].'/pages', array('type' => 'article'))); ?>"><?php e(t('articles')); ?></a>, |
|
26 | + <a href="<?php e(url($s['id'].'/pages', array('type' => 'news'))); ?>"><?php e(t('news')); ?></a> |
|
27 | 27 | </td> |
28 | 28 | <td class="options"> |
29 | 29 | <a class="edit" href="<?php e(url($s['id'], array('edit'))); ?>"><?php e(t('edit settings')); ?></a> |
@@ -6,9 +6,12 @@ |
||
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> |
@@ -36,22 +36,22 @@ |
||
36 | 36 | <h2><?php e(t('pages')); ?></h2> |
37 | 37 | |
38 | 38 | <ul class="options"> |
39 | - <li><a href="<?php e(url('pages', array('type' => 'page'))); ?>"><?php e(t('go to pages')); ?></a></li> |
|
40 | - <li><a href="<?php e(url('pages', array('create', 'type' => 'page'))); ?>"><?php e(t('create a new page')); ?></a></li> |
|
39 | + <li><a href="<?php e(url('pages', array('type' => 'page'))); ?>"><?php e(t('go to pages')); ?></a></li> |
|
40 | + <li><a href="<?php e(url('pages', array('create', 'type' => 'page'))); ?>"><?php e(t('create a new page')); ?></a></li> |
|
41 | 41 | </ul> |
42 | 42 | |
43 | 43 | <h2><?php e(t('articles')); ?></h2> |
44 | 44 | |
45 | 45 | <ul class="options"> |
46 | - <li><a href="<?php e(url('pages', array('type' => 'article'))); ?>"><?php e(t('go to articles')); ?></a></li> |
|
46 | + <li><a href="<?php e(url('pages', array('type' => 'article'))); ?>"><?php e(t('go to articles')); ?></a></li> |
|
47 | 47 | <li><a href="<?php e(url('pages', array('create', 'type' => 'article'))); ?>"><?php e(t('create a new article')); ?></a></li> |
48 | 48 | </ul> |
49 | 49 | |
50 | 50 | <h2><?php e(t('news')); ?></h2> |
51 | 51 | |
52 | 52 | <ul class="options"> |
53 | - <li><a href="<?php e(url('pages', array('type' => 'news'))); ?>"><?php e(t('go to news')); ?></a></li> |
|
54 | - <li><a href="<?php e(url('pages', array('create', 'type' => 'news'))); ?>"><?php e(t('create a news')); ?></a></li> |
|
53 | + <li><a href="<?php e(url('pages', array('type' => 'news'))); ?>"><?php e(t('go to news')); ?></a></li> |
|
54 | + <li><a href="<?php e(url('pages', array('create', 'type' => 'news'))); ?>"><?php e(t('create a news')); ?></a></li> |
|
55 | 55 | </ul> |
56 | 56 | |
57 | 57 | <?php endif; ?> |
@@ -17,15 +17,21 @@ |
||
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> |
@@ -12,7 +12,7 @@ |
||
12 | 12 | </thead> |
13 | 13 | <?php foreach ($pages as $p) :?> |
14 | 14 | <tr> |
15 | - <td><a href="<?php e(url($p['id'])); ?>"><?php e(str_repeat("- ", $p['level']) . $p['navigation_name']); ?></a></td> |
|
15 | + <td><a href="<?php e(url($p['id'])); ?>"><?php e(str_repeat("- ", $p['level']).$p['navigation_name']); ?></a></td> |
|
16 | 16 | <td><?php e($p['identifier']); ?></td> |
17 | 17 | <td> |
18 | 18 | <?php if ($p['status'] == 'published') { |
@@ -3,8 +3,11 @@ discard block |
||
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 |
||
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" /> |
@@ -70,9 +70,9 @@ |
||
70 | 70 | require_once dirname(__FILE__) . '/../../../CKEditor.php'; |
71 | 71 | $config['language'] = 'da'; |
72 | 72 | $config['toolbar'] = array( |
73 | - array( 'Source', '-', 'Cut','Copy','Paste','PasteText','PasteFromWord', '', 'Undo','Redo', '-', 'Format', 'Bold', 'Italic', 'Strike' ), |
|
74 | - array( 'Image', 'Link', 'Unlink', 'NumberedList', 'BulletedList', 'Blockquote', 'Outdent', 'Indent', '-', 'Maximize' ) |
|
75 | - ); |
|
73 | + array( 'Source', '-', 'Cut','Copy','Paste','PasteText','PasteFromWord', '', 'Undo','Redo', '-', 'Format', 'Bold', 'Italic', 'Strike' ), |
|
74 | + array( 'Image', 'Link', 'Unlink', 'NumberedList', 'BulletedList', 'Blockquote', 'Outdent', 'Indent', '-', 'Maximize' ) |
|
75 | + ); |
|
76 | 76 | $config['filebrowserBrowseUrl'] = url('/restricted/module/filemanager/ckeditor', array('images' => 1)); |
77 | 77 | $CKEditor = new CKEditor(); |
78 | 78 | echo $CKEditor->editor("text", $value['text'], $config); |
@@ -67,11 +67,11 @@ |
||
67 | 67 | if (!isset($value['text'])) { |
68 | 68 | $value['text'] = ''; |
69 | 69 | } |
70 | - require_once dirname(__FILE__) . '/../../../CKEditor.php'; |
|
70 | + require_once dirname(__FILE__).'/../../../CKEditor.php'; |
|
71 | 71 | $config['language'] = 'da'; |
72 | 72 | $config['toolbar'] = array( |
73 | - array( 'Source', '-', 'Cut','Copy','Paste','PasteText','PasteFromWord', '', 'Undo','Redo', '-', 'Format', 'Bold', 'Italic', 'Strike' ), |
|
74 | - array( 'Image', 'Link', 'Unlink', 'NumberedList', 'BulletedList', 'Blockquote', 'Outdent', 'Indent', '-', 'Maximize' ) |
|
73 | + array('Source', '-', 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '', 'Undo', 'Redo', '-', 'Format', 'Bold', 'Italic', 'Strike'), |
|
74 | + array('Image', 'Link', 'Unlink', 'NumberedList', 'BulletedList', 'Blockquote', 'Outdent', 'Indent', '-', 'Maximize') |
|
75 | 75 | ); |
76 | 76 | $config['filebrowserBrowseUrl'] = url('/restricted/module/filemanager/ckeditor', array('images' => 1)); |
77 | 77 | $CKEditor = new CKEditor(); |