From bf2a97147ecef7528e9adbed3cf4a1f3af03ad72 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Apr 2015 11:50:21 +0200 Subject: some more on webpages --- include/text.php | 27 +++++++++++++++------------ mod/editwebpage.php | 2 +- mod/webpages.php | 8 ++++---- view/css/mod_webpages.css | 3 ++- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/include/text.php b/include/text.php index 791254e52..29654e1fd 100644 --- a/include/text.php +++ b/include/text.php @@ -1595,18 +1595,20 @@ function layout_select($channel_id, $current = '') { intval($channel_id), intval(ITEM_PDL) ); + if($r) { - $o = t('Select a page layout: '); - $o .= ''; } + $o = replace_macros(get_markup_template('field_select_raw.tpl'), array( + '$field' => array('layout_mid', t('Page layout'), $selected, t('You can create your own with the layouts tool'), $options) + )); + return $o; } @@ -1639,13 +1641,14 @@ function mimetype_select($channel_id, $current = 'text/bbcode') { } } - $o = t('Page content type: '); - $o .= ''; + + $o = replace_macros(get_markup_template('field_select_raw.tpl'), array( + '$field' => array('mimetype', t('Page content type'), $selected, t('If unsure select text/bbcode'), $options) + )); return $o; } @@ -2105,7 +2108,7 @@ function design_tools() { $who = $channel['channel_address']; return replace_macros(get_markup_template('design_tools.tpl'), array( - '$title' => t('Design'), + '$title' => t('Design Tools'), '$who' => $who, '$sys' => $sys, '$blocks' => t('Blocks'), diff --git a/mod/editwebpage.php b/mod/editwebpage.php index e81cde479..e30a33171 100644 --- a/mod/editwebpage.php +++ b/mod/editwebpage.php @@ -126,7 +126,7 @@ function editwebpage_content(&$a) { $plaintext = true; if(get_config('system','page_mimetype')) - $mimeselect = ''; + $mimeselect = ''; else $mimeselect = mimetype_select($itm[0]['uid'],$mimetype); diff --git a/mod/webpages.php b/mod/webpages.php index b4c4e6e4e..2b284813a 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -70,10 +70,10 @@ function webpages_content(&$a) { return; } - if(feature_enabled($owner,'expert') || $a->is_sys) { - $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); - if(! $mimetype) - $mimetype = 'choose'; + $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); + + if(! $mimetype) { + $mimetype = 'choose'; } else { $mimetype = 'text/bbcode'; diff --git a/view/css/mod_webpages.css b/view/css/mod_webpages.css index af1ef5357..29cd1e803 100644 --- a/view/css/mod_webpages.css +++ b/view/css/mod_webpages.css @@ -12,8 +12,9 @@ #webpage-list-table td:nth-child(1){ padding: 7px 3px 7px 10px; - white-space: nowrap; + word-wrap: break-word; } + #webpage-list-table th:nth-child(5), #webpage-list-table td:nth-child(5){ padding: 7px 3px; -- cgit v1.2.3 From 2001ad94bd16c283b2cc79d8e48646d61acb5a77 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Apr 2015 11:59:49 +0200 Subject: dont suggest anything here it explains itself --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index 29654e1fd..f1f6d41f0 100644 --- a/include/text.php +++ b/include/text.php @@ -1647,7 +1647,7 @@ function mimetype_select($channel_id, $current = 'text/bbcode') { } $o = replace_macros(get_markup_template('field_select_raw.tpl'), array( - '$field' => array('mimetype', t('Page content type'), $selected, t('If unsure select text/bbcode'), $options) + '$field' => array('mimetype', t('Page content type'), $selected, '', $options) )); return $o; -- cgit v1.2.3 From 953819e7da8152f959f04c733ce617cc34cf8c7d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Apr 2015 12:52:31 +0200 Subject: css fixes and remove expert mode for block page content type --- mod/blocks.php | 11 +++-------- mod/webpages.php | 3 --- view/css/mod_webpages.css | 2 +- view/tpl/webpagelist.tpl | 2 +- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/mod/blocks.php b/mod/blocks.php index 1b7a3588f..e0f32f4f1 100644 --- a/mod/blocks.php +++ b/mod/blocks.php @@ -78,16 +78,11 @@ function blocks_content(&$a) { return; } + $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); - if(feature_enabled($owner,'expert')) { - $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); - if(! $mimetype) - $mimetype = 'choose'; + if(! $mimetype) { + $mimetype = 'choose'; } - else { - $mimetype = 'text/bbcode'; - } - $x = array( 'webpage' => ITEM_BUILDBLOCK, diff --git a/mod/webpages.php b/mod/webpages.php index 2b284813a..e2b5eb3a4 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -75,9 +75,6 @@ function webpages_content(&$a) { if(! $mimetype) { $mimetype = 'choose'; } - else { - $mimetype = 'text/bbcode'; - } $layout = (($_REQUEST['layout']) ? $_REQUEST['layout'] : get_pconfig($owner,'system','page_layout')); if(! $layout) diff --git a/view/css/mod_webpages.css b/view/css/mod_webpages.css index 29cd1e803..32291adc7 100644 --- a/view/css/mod_webpages.css +++ b/view/css/mod_webpages.css @@ -7,12 +7,12 @@ } #webpage-list-table th:nth-child(1){ + padding: 7px 3px 7px 10px; white-space: nowrap; } #webpage-list-table td:nth-child(1){ padding: 7px 3px 7px 10px; - word-wrap: break-word; } #webpage-list-table th:nth-child(5), diff --git a/view/tpl/webpagelist.tpl b/view/tpl/webpagelist.tpl index 4e5b3e0e4..9d440eb64 100644 --- a/view/tpl/webpagelist.tpl +++ b/view/tpl/webpagelist.tpl @@ -13,7 +13,7 @@ {{/if}} {{if $pages}} -
+
-- cgit v1.2.3
{{$pagelink_txt}}