Image selector toggled by showMediaToolbar
And $media.manage in the templates
This commit is contained in:
@ -94,4 +94,5 @@ trackback-functions still use echo for messages"):
|
||||
* Added option simpleFilters (meant to indicate to show less filters and poweruser-options)
|
||||
|
||||
* serendipity_admin_image_selector.php no longer used by 2k11, instead the media library (with admin/media_choose.tpl, admin/media_upload.tpl, media_pane.tpl, media_items.tpl)
|
||||
can generat the imageselector on its own. The editor calls serendipity_admin.php?serendipity[adminModule]=media isntead, with serendipity[textarea] indicating the target
|
||||
can generat the imageselector on its own. The editor calls serendipity_admin.php?serendipity[adminModule]=media instead, with serendipity[textarea] indicating the target, and
|
||||
serendipity[showMediaToolbar] activating the imageSelector modus
|
@ -556,7 +556,8 @@ switch ($serendipity['GET']['adminAction']) {
|
||||
'max_file_size' => $serendipity['maxFileSize'],
|
||||
'maxImgHeight' => $serendipity['maxImgHeight'],
|
||||
'maxImgWidth' => $serendipity['maxImgWidth'],
|
||||
'extraParems' => serendipity_generateImageSelectorParems()
|
||||
'extraParems' => serendipity_generateImageSelectorParems(),
|
||||
'manage' => isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true
|
||||
);
|
||||
// ToDo later: merge $data and $media
|
||||
$serendipity['smarty']->assign('media', $mediaFiles);
|
||||
|
@ -1432,7 +1432,7 @@ function serendipity_calculate_aspect_size($width, $height, $size, $constraint =
|
||||
* @access public
|
||||
* @param int The current page number
|
||||
* @param string The HTML linebreak to use after a row of images
|
||||
* @param boolean Should the toolbar for editing media files be shown?
|
||||
* @param boolean Is this the ML-Version for managing everything (true), or is it about selecting one image for the editor? (false)
|
||||
* @param string The URL to use for pagination
|
||||
* @param boolean Show the "upload media item" feature?
|
||||
* @param boolean Restrict viewing images to a specific directory
|
||||
@ -1658,7 +1658,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa
|
||||
function serendipity_generateImageSelectorParems() {
|
||||
global $serendipity;
|
||||
$sortParams = array('perpage', 'order', 'ordermode');
|
||||
$importParams = array('adminModule', 'htmltarget', 'filename_only', 'textarea', 'subpage', 'keywords', 'noBanner', 'noSidebar', 'noFooter', 'showUpload');
|
||||
$importParams = array('adminModule', 'htmltarget', 'filename_only', 'textarea', 'subpage', 'keywords', 'noBanner', 'noSidebar', 'noFooter', 'showUpload','showMediaToolbar');
|
||||
$extraParems = '';
|
||||
$filterParams = array('only_path', 'only_filename');
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{foreach from=$media.files item="file" name="mediafiles" key="mediakey"}
|
||||
{if $smarty.get.serendipity.showUpload}
|
||||
{if NOT $media.manage}
|
||||
{* ML got called for inserting media *}
|
||||
<article class="media_wrap_thumb {cycle values="odd,even"}">
|
||||
<div class="media_file_thumb{if $media.enclose} equal_heights{/if}">
|
||||
|
@ -153,7 +153,8 @@
|
||||
{else}
|
||||
{if $smarty.get.serendipity.showUpload}
|
||||
<a class="button_link" href="?serendipity[adminModule]=media&serendipity[adminAction]=addSelect&{$media.extraParems}">{$CONST.ADD_MEDIA}</a>
|
||||
{else}
|
||||
{/if}
|
||||
{if $media.manage}
|
||||
<form id="formMultiDelete" name="formMultiDelete" action="?" method="post">
|
||||
{$media.token}
|
||||
<input name="serendipity[action]" type="hidden" value="admin">
|
||||
@ -174,13 +175,11 @@
|
||||
</nav>
|
||||
{/if}
|
||||
</div>
|
||||
{if NOT $smarty.get.serendipity.showUpload}
|
||||
{if $media.manage}
|
||||
{if $media.manage}
|
||||
<div class="form_buttons">
|
||||
<input class="invert_selection" name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}">
|
||||
<input class="state_cancel" name="toggle" type="submit" value="{$CONST.DELETE}">
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -70,7 +70,7 @@
|
||||
<input id="all_authors" name="serendipity[all_authors]" type="hidden" value="true" checked="checked">
|
||||
|
||||
<input class="check_inputs" type="submit" value="{$CONST.GO}">
|
||||
{if NOT $smarty.get.serendipity.showUpload}
|
||||
{if $media.manage}
|
||||
<input class="check_inputs" name="go_properties" type="submit" value="{$CONST.GO_ADD_PROPERTIES|@escape}">
|
||||
{/if}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user