diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-04-17 11:20:22 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-04-17 11:20:22 +0200 |
commit | 61e4ee753dd0e823c47a5cf2e485f7f69fb4d125 (patch) | |
tree | 59479f4c5baf7e57d7ff56e8b2f21462db6c25f5 /mod | |
parent | 10cc643f650b5ff0954ff988fbf768ea5e061571 (diff) | |
download | volse-hubzilla-61e4ee753dd0e823c47a5cf2e485f7f69fb4d125.tar.gz volse-hubzilla-61e4ee753dd0e823c47a5cf2e485f7f69fb4d125.tar.bz2 volse-hubzilla-61e4ee753dd0e823c47a5cf2e485f7f69fb4d125.zip |
allow jot to be displayed expanded, remove deprected datetimepicker js and some random fixes
Diffstat (limited to 'mod')
-rw-r--r-- | mod/editwebpage.php | 19 | ||||
-rw-r--r-- | mod/rpost.php | 10 | ||||
-rw-r--r-- | mod/webpages.php | 1 |
3 files changed, 15 insertions, 15 deletions
diff --git a/mod/editwebpage.php b/mod/editwebpage.php index 55cd3b4ef..a7564a126 100644 --- a/mod/editwebpage.php +++ b/mod/editwebpage.php @@ -135,12 +135,7 @@ function editwebpage_content(&$a) { $layoutselect = '<input type="hidden" name="layout_mid" value="' . $layout . '" />'; else $layoutselect = layout_select($itm[0]['uid'],$itm[0]['layout_mid']); - - $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( - '$title' => t('Edit Webpage') - )); - $a->page['htmlhead'] .= replace_macros(get_markup_template('jot-header.tpl'), array( '$baseurl' => $a->get_baseurl(), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), @@ -150,7 +145,6 @@ function editwebpage_content(&$a) { '$confirmdelete' => t('Delete webpage?') )); - $tpl = get_markup_template("jot.tpl"); $jotplugins = ''; @@ -164,8 +158,9 @@ function editwebpage_content(&$a) { $rp = 'webpages/' . $which; -logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage'))); - $o .= replace_macros($tpl,array( + logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos') || perm_is_allowed($owner, get_observer_hash(), 'write_storage'))); + + $editor = replace_macros($tpl,array( '$return_path' => $rp, '$webpage' => ITEM_WEBPAGE, '$placeholdpagetitle' => t('Page link title'), @@ -218,8 +213,12 @@ logger('canwrite: ' . (perm_is_allowed($owner, get_observer_hash(), 'post_photos )); - if(($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) - $o .= '<br /><br /><a class="page-delete-link" href="item/drop/' . $itm[0]['id'] . '" >' . t('Delete Webpage') . '</a><br />'; + $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( + '$title' => t('Edit Webpage'), + '$delete' => ((($itm[0]['author_xchan'] === $ob_hash) || ($itm[0]['owner_xchan'] === $ob_hash)) ? t('Delete') : false), + '$editor' => $editor, + '$id' => $itm[0]['id'] + )); return $o; diff --git a/mod/rpost.php b/mod/rpost.php index 737d705f6..0c0916646 100644 --- a/mod/rpost.php +++ b/mod/rpost.php @@ -101,10 +101,6 @@ function rpost_content(&$a) { 'deny_gid' => $channel['channel_deny_gid'] ); - $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( - '$title' => t('Edit post') - )); - if($_REQUEST['url']) { $x = z_fetch_url(z_root() . '/parse_url?f=&url=' . urlencode($_REQUEST['url'])); if($x['success']) @@ -129,8 +125,12 @@ function rpost_content(&$a) { 'return_path' => 'rpost/return' ); + $editor = status_editor($a,$x); - $o .= status_editor($a,$x); + $o .= replace_macros(get_markup_template('edpost_head.tpl'), array( + '$title' => t('Edit post'), + '$editor' => $editor + )); return $o; diff --git a/mod/webpages.php b/mod/webpages.php index 5013d803a..b303b8652 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -115,6 +115,7 @@ function webpages_content(&$a) { 'profile_uid' => intval($owner), 'mimetype' => $mimetype, 'layout' => $layout, + 'expanded' => true ); if($_REQUEST['title']) |