@@ -10,7 +10,7 @@ |
||
10 | 10 | function __construct($cmssite) |
11 | 11 | { |
12 | 12 | if (!is_object($cmssite) or strtolower(get_class($cmssite)) != 'cms_site') { |
13 | - throw new Exception('CMS_Stylesheet::__construct needs CMS_Site - got ' . get_class($cmssite)); |
|
13 | + throw new Exception('CMS_Stylesheet::__construct needs CMS_Site - got '.get_class($cmssite)); |
|
14 | 14 | } |
15 | 15 | $this->cmssite = $cmssite; |
16 | 16 | $this->error = new Intraface_Error; |
@@ -7,6 +7,9 @@ |
||
7 | 7 | private $cmssite; |
8 | 8 | public $error; |
9 | 9 | |
10 | + /** |
|
11 | + * @param CMS_Site $cmssite |
|
12 | + */ |
|
10 | 13 | function __construct($cmssite) |
11 | 14 | { |
12 | 15 | if (!is_object($cmssite) or strtolower(get_class($cmssite)) != 'cms_site') { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->db = MDB2::singleton(DB_DSN); |
31 | 31 | $this->cmspage = $cmspage; |
32 | 32 | $this->kernel = $cmspage->kernel; |
33 | - $this->id = (int) $id; |
|
33 | + $this->id = (int)$id; |
|
34 | 34 | //$template_class = 'CMS_Template_' . $this->value['type']; |
35 | 35 | |
36 | 36 | $this->error = new Intraface_Error(); |
@@ -184,16 +184,16 @@ discard block |
||
184 | 184 | if ($this->id == 0) { |
185 | 185 | $sql_type = "INSERT INTO "; |
186 | 186 | $sql_end = ", date_created = NOW(), |
187 | - type_key = ".$var['type_key'] . ", |
|
187 | + type_key = ".$var['type_key'].", |
|
188 | 188 | template_section_id = ".$var['template_section_id']; |
189 | 189 | } else { |
190 | 190 | $sql_type = "UPDATE "; |
191 | - $sql_end = " WHERE id = " . $this->id; |
|
191 | + $sql_end = " WHERE id = ".$this->id; |
|
192 | 192 | } |
193 | - $sql = $sql_type . " cms_section SET |
|
193 | + $sql = $sql_type." cms_section SET |
|
194 | 194 | intranet_id = ".$this->cmspage->kernel->intranet->get('id').", |
195 | - page_id=". (int)$this->cmspage->get('id') . ", |
|
196 | - site_id=". (int)$this->cmspage->cmssite->get('id') . ", |
|
195 | + page_id=". (int)$this->cmspage->get('id').", |
|
196 | + site_id=". (int)$this->cmspage->cmssite->get('id').", |
|
197 | 197 | date_updated = NOW() |
198 | 198 | " . $sql_end; |
199 | 199 |
@@ -58,11 +58,17 @@ |
||
58 | 58 | return new CMS_Parameter($this); |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param string $key |
|
63 | + */ |
|
61 | 64 | public function addParameter($key, $value) |
62 | 65 | { |
63 | 66 | return $this->parameter->save($key, $value); |
64 | 67 | } |
65 | 68 | |
69 | + /** |
|
70 | + * @param string $type |
|
71 | + */ |
|
66 | 72 | public function factory($object, $type, $value) |
67 | 73 | { |
68 | 74 | $class_prefix = 'Intraface_modules_cms_section_'; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public function save($parameter, $value) |
80 | 80 | { |
81 | 81 | if ($this->object->get('id') == 0) { |
82 | - throw new Exception('Parameter::save() object cannot be 0 - problems in ' . get_class($this->object)); |
|
82 | + throw new Exception('Parameter::save() object cannot be 0 - problems in '.get_class($this->object)); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | # mangler noget validering - skal sikkert kunne s�ttes fra elementet? |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | |
92 | 92 | // hvis parameteren tidligere er oprettet opdateres den! |
93 | 93 | if (!empty($old_parameter)) { |
94 | - $db->query("UPDATE cms_parameter SET value='".$value."' WHERE type_key = ".$this->type_key." AND intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id=". $this->object->get('id') . " AND parameter='".$parameter."'"); |
|
94 | + $db->query("UPDATE cms_parameter SET value='".$value."' WHERE type_key = ".$this->type_key." AND intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id=".$this->object->get('id')." AND parameter='".$parameter."'"); |
|
95 | 95 | } elseif (!empty($value) and empty($old_parameter)) { |
96 | 96 | // hvis parameteren ikke findes oprettes den |
97 | 97 | $db->query("INSERT INTO cms_parameter SET type_key=".$this->type_key.", belong_to_id = '".$this->object->get('id')."', parameter='".$parameter."', value='".$value."', intranet_id = ".$this->object->kernel->intranet->get('id')); |
98 | 98 | } elseif (empty($value) and !empty($old_parameter)) { |
99 | 99 | // hvis parametervvalue er tom skal den gamle parameter slettes |
100 | - $db->query("DELETE FROM cms_parameter WHERE belong_to_id = '".$this->object->get('id')."' AND parameter='".$parameter."' AND intranet_id = ".$this->object->kernel->intranet->get('id') . " AND type_key =" .$this->type_key); |
|
100 | + $db->query("DELETE FROM cms_parameter WHERE belong_to_id = '".$this->object->get('id')."' AND parameter='".$parameter."' AND intranet_id = ".$this->object->kernel->intranet->get('id')." AND type_key =".$this->type_key); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $this->load(); |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | private function load() |
115 | 115 | { |
116 | 116 | if ($this->object->get('id') == 0) { |
117 | - throw new Exception('Parameter::save() object cannot be 0 - problems with ' . get_class($this->object)); |
|
117 | + throw new Exception('Parameter::save() object cannot be 0 - problems with '.get_class($this->object)); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | $db = new DB_Sql; |
121 | - $sql = "SELECT parameter, value FROM cms_parameter WHERE intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id = " . $this->object->get('id') . " AND type_key = " . $this->type_key; // . " AND parameter = '" .$parameter . "'" |
|
121 | + $sql = "SELECT parameter, value FROM cms_parameter WHERE intranet_id = ".$this->object->kernel->intranet->get('id')." AND belong_to_id = ".$this->object->get('id')." AND type_key = ".$this->type_key; // . " AND parameter = '" .$parameter . "'" |
|
122 | 122 | $db->query($sql); |
123 | 123 | |
124 | 124 | while ($db->nextRecord()) { |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | |
72 | 72 | if ($this->id > 0) { |
73 | 73 | $sql_type = "UPDATE "; |
74 | - $sql_end = " WHERE id = " . $this->id; |
|
74 | + $sql_end = " WHERE id = ".$this->id; |
|
75 | 75 | } else { |
76 | 76 | $sql_type = "INSERT INTO "; |
77 | 77 | $sql_end = " , date_created = NOW()"; |
78 | 78 | } |
79 | 79 | |
80 | 80 | $db = new DB_Sql; |
81 | - $db->query($sql_type . " cms_site |
|
81 | + $db->query($sql_type." cms_site |
|
82 | 82 | SET intranet_id = ".$this->kernel->intranet->get('id').", |
83 | 83 | name = '".$var['name']."', |
84 | 84 | url = '".$var['url']."', |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->id = $db->insertedId(); |
89 | 89 | } |
90 | 90 | |
91 | - $this->kernel->setting->set('intranet', 'cc_license', intval($var['cc_license']), 'site_id_' . $this->id); |
|
91 | + $this->kernel->setting->set('intranet', 'cc_license', intval($var['cc_license']), 'site_id_'.$this->id); |
|
92 | 92 | |
93 | 93 | $this->load(); |
94 | 94 | |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | function load() |
99 | 99 | { |
100 | 100 | $db = new DB_Sql; |
101 | - $db->query("SELECT id, name, url FROM cms_site WHERE id = " . $this->id . " AND intranet_id = ".$this->kernel->intranet->get('id')." LIMIT 1"); |
|
101 | + $db->query("SELECT id, name, url FROM cms_site WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')." LIMIT 1"); |
|
102 | 102 | if (!$db->nextRecord()) { |
103 | 103 | return 0; |
104 | 104 | } |
105 | 105 | $this->value['id'] = $db->f('id'); |
106 | 106 | $this->value['name'] = $db->f('name'); |
107 | 107 | $this->value['url'] = $db->f('url'); |
108 | - $this->value['cc_license'] = $this->kernel->setting->get('intranet', 'cc_license', 'site_id_' . $this->get('id')); |
|
108 | + $this->value['cc_license'] = $this->kernel->setting->get('intranet', 'cc_license', 'site_id_'.$this->get('id')); |
|
109 | 109 | |
110 | 110 | } |
111 | 111 | |
@@ -116,14 +116,14 @@ discard block |
||
116 | 116 | return 0; |
117 | 117 | } |
118 | 118 | $db = new Db_Sql; |
119 | - $db->query("UPDATE cms_site SET active = 0 WHERE intranet_id=".$this->kernel->intranet->get('id')." AND id = " . $this->id); |
|
119 | + $db->query("UPDATE cms_site SET active = 0 WHERE intranet_id=".$this->kernel->intranet->get('id')." AND id = ".$this->id); |
|
120 | 120 | return 1; |
121 | 121 | } |
122 | 122 | |
123 | 123 | function getList() |
124 | 124 | { |
125 | 125 | $db = new DB_Sql; |
126 | - $db->query("SELECT id, name FROM cms_site WHERE intranet_id = " . $this->kernel->intranet->get('id'). " AND active = 1"); |
|
126 | + $db->query("SELECT id, name FROM cms_site WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1"); |
|
127 | 127 | $i = 0; |
128 | 128 | $sites = array(); |
129 | 129 | while ($db->nextRecord()) { |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | throw new Exception('TemplateSection::__construct skal bruge CMS_Template'); |
32 | 32 | } |
33 | 33 | $this->error = new Intraface_Error; |
34 | - $this->id = (int) $id; |
|
34 | + $this->id = (int)$id; |
|
35 | 35 | $this->template = $template; |
36 | 36 | $this->kernel = $template->kernel; |
37 | 37 | |
38 | - $this->value['identify_as'] = 'cms_template_section'; // bruges af parameter |
|
38 | + $this->value['identify_as'] = 'cms_template_section'; // bruges af parameter |
|
39 | 39 | |
40 | 40 | $this->parameter = $this->createParameterObject(); |
41 | 41 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | // validering p� value |
76 | 76 | // kun v�re gyldige elementtyper |
77 | 77 | // object skal vre cmspage |
78 | - $class = $class_prefix . ucfirst($value); |
|
78 | + $class = $class_prefix.ucfirst($value); |
|
79 | 79 | return new $class($object); |
80 | 80 | break; |
81 | 81 | case 'id': |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | $section_types = $cms_module->getSetting('section_types'); |
85 | 85 | |
86 | 86 | $db = new DB_Sql; |
87 | - $db->query("SELECT id, type_key, template_id FROM cms_template_section WHERE id = " . $value . " AND intranet_id = " . $object->intranet->get('id')); |
|
87 | + $db->query("SELECT id, type_key, template_id FROM cms_template_section WHERE id = ".$value." AND intranet_id = ".$object->intranet->get('id')); |
|
88 | 88 | if (!$db->nextRecord()) { |
89 | 89 | return false; |
90 | 90 | } |
91 | 91 | |
92 | - $class = $class_prefix . ucfirst($section_types[$db->f('type_key')]); |
|
92 | + $class = $class_prefix.ucfirst($section_types[$db->f('type_key')]); |
|
93 | 93 | return new $class(CMS_Template::factory($object, 'id', $db->f('template_id')), $db->f('id')); |
94 | 94 | |
95 | 95 | break; |
@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | $section_types = $cms_module->getSetting('section_types'); |
100 | 100 | |
101 | 101 | $db = new DB_Sql; |
102 | - $db->query("SELECT id, type_key FROM cms_template_section WHERE id = " . $value . " AND intranet_id = " . $object->kernel->intranet->get('id')); |
|
102 | + $db->query("SELECT id, type_key FROM cms_template_section WHERE id = ".$value." AND intranet_id = ".$object->kernel->intranet->get('id')); |
|
103 | 103 | if (!$db->nextRecord()) { |
104 | 104 | return false; |
105 | 105 | } |
106 | 106 | |
107 | - $class = $class_prefix . ucfirst($section_types[$db->f('type_key')]); |
|
107 | + $class = $class_prefix.ucfirst($section_types[$db->f('type_key')]); |
|
108 | 108 | return new $class($object, $db->f('id')); |
109 | 109 | |
110 | 110 | break; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | function load() |
118 | 118 | { |
119 | 119 | $db = new DB_Sql; |
120 | - $db->query("SELECT id, name, identifier, type_key, locked FROM cms_template_section WHERE cms_template_section.intranet_id = ".$this->template->cmssite->kernel->intranet->get('id')." AND cms_template_section.id = " . $this->id); |
|
120 | + $db->query("SELECT id, name, identifier, type_key, locked FROM cms_template_section WHERE cms_template_section.intranet_id = ".$this->template->cmssite->kernel->intranet->get('id')." AND cms_template_section.id = ".$this->id); |
|
121 | 121 | if (!$db->nextRecord()) { |
122 | 122 | return 0; |
123 | 123 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $this->error->set('error in identifier - cannot be empty'); |
146 | 146 | } |
147 | 147 | |
148 | - if (!Validate::string($var['identifier'], array('format' => VALIDATE_ALPHA . VALIDATE_NUM . '-_'))) { |
|
148 | + if (!Validate::string($var['identifier'], array('format' => VALIDATE_ALPHA.VALIDATE_NUM.'-_'))) { |
|
149 | 149 | $this->error->set('error in identfier - allowed characters are a-z and 1-9'); |
150 | 150 | } |
151 | 151 | if ($this->isIdentifierUnique($var['identifier'])) { |
@@ -176,12 +176,12 @@ discard block |
||
176 | 176 | $sql_end = ", date_created = NOW()"; |
177 | 177 | } else { |
178 | 178 | $sql_type = "UPDATE "; |
179 | - $sql_end = " WHERE id = " . $this->id; |
|
179 | + $sql_end = " WHERE id = ".$this->id; |
|
180 | 180 | } |
181 | - $sql = $sql_type . " cms_template_section SET |
|
181 | + $sql = $sql_type." cms_template_section SET |
|
182 | 182 | name = '".safeToDb($var['name'])."', |
183 | 183 | identifier = '".safeToDb($var['identifier'])."', |
184 | - site_id = " . $this->template->cmssite->get('id') . ", |
|
184 | + site_id = " . $this->template->cmssite->get('id').", |
|
185 | 185 | intranet_id = ".$this->template->kernel->intranet->get('id').", |
186 | 186 | template_id = ".$this->template->get('id').", |
187 | 187 | type_key = ".$this->value['type_key'].", |
@@ -211,14 +211,14 @@ discard block |
||
211 | 211 | function delete() |
212 | 212 | { |
213 | 213 | $db = new DB_Sql; |
214 | - $db->query("UPDATE cms_template_section SET active = 0 WHERE id = " . $this->id); |
|
214 | + $db->query("UPDATE cms_template_section SET active = 0 WHERE id = ".$this->id); |
|
215 | 215 | return true; |
216 | 216 | } |
217 | 217 | |
218 | 218 | function getList() |
219 | 219 | { |
220 | 220 | $db = new DB_Sql; |
221 | - $db->query("SELECT id, name, identifier, type_key FROM cms_template_section WHERE template_id = " . $this->template->get('id') . " AND intranet_id = " . $this->kernel->intranet->get('id') . " AND active = 1 ORDER BY position ASC"); |
|
221 | + $db->query("SELECT id, name, identifier, type_key FROM cms_template_section WHERE template_id = ".$this->template->get('id')." AND intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1 ORDER BY position ASC"); |
|
222 | 222 | |
223 | 223 | $i = 0; |
224 | 224 | $sections = array(); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | function isIdentifierUnique($identifier) |
238 | 238 | { |
239 | 239 | $db = new DB_Sql; |
240 | - $db->query("SELECT count(*) AS antal FROM cms_template_section WHERE identifier = '".$identifier."' AND intranet_id = " . $this->kernel->intranet->get('id') . " AND template_id = " . $this->template->get('id') . " AND active = 1 AND id != " . $this->id); |
|
240 | + $db->query("SELECT count(*) AS antal FROM cms_template_section WHERE identifier = '".$identifier."' AND intranet_id = ".$this->kernel->intranet->get('id')." AND template_id = ".$this->template->get('id')." AND active = 1 AND id != ".$this->id); |
|
241 | 241 | if (!$db->nextRecord()) { |
242 | 242 | return 0; |
243 | 243 | } |
@@ -62,11 +62,17 @@ |
||
62 | 62 | return new CMS_Parameter($this); |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @param string $key |
|
67 | + */ |
|
65 | 68 | function addParameter($key, $value) |
66 | 69 | { |
67 | 70 | return $this->parameter->save($key, $value); |
68 | 71 | } |
69 | 72 | |
73 | + /** |
|
74 | + * @param string $type |
|
75 | + */ |
|
70 | 76 | function factory($object, $type, $value) |
71 | 77 | { |
72 | 78 | $class_prefix = 'Intraface_modules_cms_templatesection_'; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | case 'longtext': |
45 | 45 | if (empty($value['html_format'])) { |
46 | - $value['html_format'] = array (); |
|
46 | + $value['html_format'] = array(); |
|
47 | 47 | } |
48 | 48 | ?> |
49 | 49 | <fieldset> |
@@ -26,7 +26,7 @@ |
||
26 | 26 | </ul> |
27 | 27 | |
28 | 28 | <ul class="options"> |
29 | - <li><a class="new" href="<?php e(url(null, array('create' => '', 'type' => $type)));?>"><?php e(t('create '.$type)); ?></a></li> |
|
29 | + <li><a class="new" href="<?php e(url(null, array('create' => '', 'type' => $type))); ?>"><?php e(t('create '.$type)); ?></a></li> |
|
30 | 30 | <li><a href="<?php e(url('../')); ?>"><?php e(t('go to site overview')); ?></a></li> |
31 | 31 | </ul> |
32 | 32 |
@@ -6,20 +6,29 @@ discard block |
||
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 |
||
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 |
@@ -26,13 +26,13 @@ |
||
26 | 26 | <tr> |
27 | 27 | <td><input id="category_<?php e($category['id']); ?>" type="checkbox" name="category[]" value="<?php e($category['id']); ?>" /></td> |
28 | 28 | <td><?php e(str_repeat('- ', $level)); ?><a href="<?php e(url($category['id'])); ?>"><?php e($category['name']); ?></a></td> |
29 | - <td><a href="<?php e(url($category['id'] . '/edit')); ?>"><?php e(t('Edit')); ?></a></td> |
|
29 | + <td><a href="<?php e(url($category['id'].'/edit')); ?>"><?php e(t('Edit')); ?></a></td> |
|
30 | 30 | </tr> |
31 | 31 | <?php |
32 | 32 | # If there is subcategories to the category |
33 | 33 | if (is_array($category['categories']) && count($category['categories']) > 0) { |
34 | 34 | # We make the items for the next level the sub categories of this category |
35 | - $level_categories[$level+1] = $category['categories']; |
|
35 | + $level_categories[$level + 1] = $category['categories']; |
|
36 | 36 | |
37 | 37 | # We move to next level |
38 | 38 | $level++; |
@@ -55,9 +55,12 @@ |
||
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 |
@@ -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 |