some more on webpages

This commit is contained in:
Mario Vavti 2015-04-14 11:50:21 +02:00
parent 865b602cf8
commit bf2a97147e
4 changed files with 22 additions and 18 deletions

View File

@ -1595,18 +1595,20 @@ function layout_select($channel_id, $current = '') {
intval($channel_id), intval($channel_id),
intval(ITEM_PDL) intval(ITEM_PDL)
); );
if($r) { if($r) {
$o = t('Select a page layout: '); $empty_selected = (($current === false) ? ' selected="selected" ' : '');
$o .= '<select name="layout_mid" id="select-layout_mid" >'; $options .= '<option value="" ' . $empty_selected . '>' . t('default') . '</option>';
$empty_selected = (($current === '') ? ' selected="selected" ' : '');
$o .= '<option value="" ' . $empty_selected . '>' . t('default') . '</option>';
foreach($r as $rr) { foreach($r as $rr) {
$selected = (($rr['mid'] == $current) ? ' selected="selected" ' : ''); $selected = (($rr['mid'] == $current) ? ' selected="selected" ' : '');
$o .= '<option value="' . $rr['mid'] . '"' . $selected . '>' . $rr['sid'] . '</option>'; $options .= '<option value="' . $rr['mid'] . '"' . $selected . '>' . $rr['sid'] . '</option>';
} }
$o .= '</select>';
} }
$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; return $o;
} }
@ -1639,13 +1641,14 @@ function mimetype_select($channel_id, $current = 'text/bbcode') {
} }
} }
$o = t('Page content type: ');
$o .= '<select name="mimetype" id="mimetype-select">';
foreach($x as $y) { foreach($x as $y) {
$select = (($y == $current) ? ' selected="selected" ' : ''); $selected = (($y == $current) ? ' selected="selected" ' : '');
$o .= '<option name="' . $y . '"' . $select . '>' . $y . '</option>'; $options .= '<option name="' . $y . '"' . $selected . '>' . $y . '</option>';
} }
$o .= '</select>';
$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; return $o;
} }
@ -2105,7 +2108,7 @@ function design_tools() {
$who = $channel['channel_address']; $who = $channel['channel_address'];
return replace_macros(get_markup_template('design_tools.tpl'), array( return replace_macros(get_markup_template('design_tools.tpl'), array(
'$title' => t('Design'), '$title' => t('Design Tools'),
'$who' => $who, '$who' => $who,
'$sys' => $sys, '$sys' => $sys,
'$blocks' => t('Blocks'), '$blocks' => t('Blocks'),

View File

@ -70,9 +70,9 @@ function webpages_content(&$a) {
return; return;
} }
if(feature_enabled($owner,'expert') || $a->is_sys) {
$mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype')); $mimetype = (($_REQUEST['mimetype']) ? $_REQUEST['mimetype'] : get_pconfig($owner,'system','page_mimetype'));
if(! $mimetype)
if(! $mimetype) {
$mimetype = 'choose'; $mimetype = 'choose';
} }
else { else {

View File

@ -12,8 +12,9 @@
#webpage-list-table td:nth-child(1){ #webpage-list-table td:nth-child(1){
padding: 7px 3px 7px 10px; padding: 7px 3px 7px 10px;
white-space: nowrap; word-wrap: break-word;
} }
#webpage-list-table th:nth-child(5), #webpage-list-table th:nth-child(5),
#webpage-list-table td:nth-child(5){ #webpage-list-table td:nth-child(5){
padding: 7px 3px; padding: 7px 3px;