first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php use_helper('stAsset', 'stTooltip') ?>
<?php include_tooltip(); ?>
<div class="assetImage" <?php echo get_tooltip($sf_asset->getFilename()) ?>>
<div class="thumbnails">
<?php echo link_to_asset_action(st_asset_image_tag($sf_asset, 'thumb', array('width' => 84), isset($folder) ? $folder->getRelativePath() : null), $sf_asset) ?>
</div>
<div class="assetComment">
<?php echo truncate_str($sf_asset->getFilename()) ?>
<div class="details">
<?php echo $sf_asset->getFilesize() ?> Kb
<?php if (!$sf_user->hasAttribute('popup', 'sf_admin/sf_asset/navigation')): ?>
<?php echo link_to(image_tag('/plugins/sfAssetsLibraryPlugin/images/delete.png', 'class=deleteImage align=top'), 'sfAsset/deleteAsset?id='.$sf_asset->getId(), array('title' => __('Komunikat'), 'confirm' => __('Czy na pewno usunąć ?'))); ?>
<?php endif; ?>
</div>
</div>
</div>

View File

@@ -0,0 +1,3 @@
<?php echo st_get_admin_actions_head('style="margin: 10px -270px; float: right"') ?>
<?php echo st_get_admin_action('save', __('Zapisz'), null, array ( 'name' => 'save',)) ?>
<?php echo st_get_admin_actions_foot() ?>

View File

@@ -0,0 +1,55 @@
<?php use_helper('Object', 'Date', 'sfAsset') ?>
<?php echo form_tag('sfAsset/save', array(
'id' => 'sf_admin_edit_form',
'name' => 'sf_admin_edit_form',
'multipart' => true,
)) ?>
<?php echo object_input_hidden_tag($sf_asset, 'getId') ?>
<fieldset id="sf_fieldset_none" class="" style="width: 862px; height: 400px">
<div class="form-row" style="border: none">
<?php echo label_for('sf_asset[filepath]', __('Path:', null, 'sfAsset'), '') ?>
<div class="content<?php if ($sf_request->hasError('sf_asset{filepath}')): ?> form-error<?php endif; ?>">
<?php if (!$sf_asset->isNew()): ?>
<div style="width: 470px">
<?php echo assets_library_breadcrumb($sf_asset->getRelativePath(), 0);?>
</div>
<?php endif; ?>
</div>
</div>
<div class="form-row" style="border: none">
<?php echo label_for('sf_asset[description]', __('Description:', null, 'sfAsset'), '') ?>
<div class="content<?php if ($sf_request->hasError('sf_asset{description}')): ?> form-error<?php endif; ?>">
<?php if ($sf_request->hasError('sf_asset{description}')): ?>
<?php echo form_error('sf_asset{description}', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
<?php echo object_textarea_tag($sf_asset, 'getDescription', array(
'size' => '30x3',
'control_name' => 'sf_asset[description]',
)) ?>
</div>
</div>
<div class="form-row" style="border: none; margin-bottom: 100px;">
<?php echo label_for('sf_asset[type]', __('Type:', null, 'sfAsset'), '') ?>
<div class="content<?php if ($sf_request->hasError('sf_asset{type}')): ?> form-error<?php endif; ?>">
<?php if ($sf_request->hasError('sf_asset{type}')): ?>
<?php echo form_error('sf_asset{type}', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
<?php foreach (sfConfig::get('app_sfAssetsLibrary_types', array('image', 'txt', 'archive', 'pdf', 'xls', 'doc', 'ppt')) as $type): ?>
<?php $options[$type] = $type; ?>
<?php endforeach; ?>
<?php echo select_tag('sf_asset[type]', options_for_select($options, $sf_asset->getType())) ?>
</div>
</div>
<?php include_partial('sfAsset/edit_form_custom', array('sf_asset' => $sf_asset)) ?>
</fieldset>
<?php include_partial('edit_actions', array('sf_asset' => $sf_asset)) ?></form>

View File

@@ -0,0 +1,29 @@
<?php use_helper('sfAsset') ?>
<div id="sf_asset_breadcrumbs">
<?php echo assets_library_breadcrumb($folder->getRelativePath(ESC_RAW)) ?>
</div>
<?php if (!$folder->isRoot()): ?>
<div class="assetImage" >
<div class="thumbnails">
<?php echo link_to_asset(image_tag('/plugins/sfAssetsLibraryPlugin/images/up', 'size=64x64 title='.__('Parent directory', null, 'Media')), 'sfAsset/list?dir='. $folder->getParentPath()) ?>
</div>
<div class="assetComment" id="ajax_dir_0">..</div>
</div>
<?php endif; ?>
<?php foreach ($dirs as $dir): ?>
<div class="assetImage" >
<div class="thumbnails">
<?php echo link_to_asset(image_tag('/plugins/sfAssetsLibraryPlugin/images/folder', 'size=64x64 title='.$dir->getName()), 'sfAsset/list?dir='.$dir->getRelativePath()) ?>
</div>
<div class="assetComment"><?php echo auto_wrap_text($dir->getName()) ?>
</div>
</div>
<?php endforeach; ?>
<?php foreach ($files as $sf_asset): ?>
<?php include_partial('sfAsset/asset', array('sf_asset' => $sf_asset, 'folder' => $folder, 'server' => stSoteshop::getServerName())) ?>
<?php endforeach; ?>
<br style="clear: both" />

View File

@@ -0,0 +1,19 @@
<?php /*
<?php if ($sf_request->hasErrors()): ?>
<div class="form-errors">
<h2><?php echo __('The form is not valid because it contains some errors.', null, 'sfAsset') ?></h2>
</div>
<?php elseif ($sf_flash->has('notice')): ?>
<div class="save-ok" style="width: 855px;">
<h2><?php echo __($sf_flash->get('notice'), null, 'sfAsset') ?></h2>
</div>
<?php elseif ($sf_flash->has('warning')): ?>
<div class="warning">
<h2><?php echo __($sf_flash->get('warning'), null, 'sfAsset') ?></h2>
</div>
<?php elseif ($sf_flash->has('warning_message') && $sf_flash->has('warning_params')): ?>
<div class="warning">
<h2><?php //echo __($sf_flash->get('warning_message'), $sf_flash->getRaw('warning_params'), 'sfAsset') ?></h2>
</div>
<?php endif; ?>
*/ ?>

View File

@@ -0,0 +1,25 @@
<?php use_helper('Javascript', 'sfAsset', 'sfAssetFile') ?>
<?php if (!$sf_asset->isNew()): ?>
<div id="thumbnail">
<a href="<?php echo $sf_asset->getUrl('full') ?>"><?php echo asset_image_tag($sf_asset, 'large', array('title' => __('See full-size version', null, 'sfAsset')), null) ?></a>
</div>
<p><?php echo auto_wrap_text($sf_asset->getFilename()) ?></p>
<p><?php echo __('%weight% Kb', array('%weight%' => $sf_asset->getFilesize()), 'sfAsset') ?></p>
<p><?php echo __('Created on %date%', array('%date%' => format_date($sf_asset->getCreatedAt('U'))), 'sfAsset') ?></p>
<?php echo form_tag('sfAsset/renameAsset', 'method=post') ?>
<?php echo input_hidden_tag('id', $sf_asset->getId()) ?>
<div class="form-row" style="border: none;">
<label for="new_name">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/page_edit.png', 'align=top') ?>
<?php echo link_to_function(__('Zmień nazwę', null, 'sfAsset'), 'document.getElementById("input_new_name").style.display="block";document.getElementById("new_name").focus()') ?>
</label>
<div class="content" id="input_new_name" style="display:none;padding-left: 1px;">
<?php echo input_hidden_tag('new_name_ext', getExtension($sf_asset->getFilename())) ?>
<?php echo input_tag('new_name', getFileName($sf_asset->getFilename()), 'style=width:160px') ?>
<?php echo submit_tag(__('Ok', null, 'sfAsset')) ?>
</div>
</div>
</form>
<?php endif; ?>

View File

@@ -0,0 +1,73 @@
<?php use_helper('Javascript', 'sfAsset') ?>
<?php if ($folder->isRoot()): ?>
<?php /*
<div class="form-row">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/images.png', 'align=top') ?>
<?php echo link_to(__('Mass upload', null, 'sfAsset'), 'sfAsset/massUpload') ?>
</div>*/ ?>
<?php endif ?>
<?php echo form_tag('sfAsset/addQuick', 'method=post multipart=true') ?>
<?php echo input_hidden_tag('parent_folder', $parent_folder) ?>
<div class="form-row" style="border: none;padding-left: 1px;">
<label for="new_file">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/image_add.png', 'align=top') ?>
<?php echo link_to_function(__('Dodaj plik do tego katalogu', null, 'sfAsset'), 'document.getElementById("input_new_file").style.display="block"') ?>
</label>
<div class="content" id="input_new_file" style="display:none;padding-left: 1px;">
<?php echo input_file_tag('new_file', 'size=7') ?> <?php echo submit_tag(__('Add', null, 'sfAsset')) ?>
</div>
</div>
</form>
<?php echo form_tag('sfAsset/createFolder', 'method=post') ?>
<?php echo input_hidden_tag('parent_folder', $parent_folder) ?>
<div class="form-row" style="border: none;padding-left: 1px;">
<label for="new_directory">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/folder_add.png', 'align=top') ?>
<?php echo link_to_function(__('Dodaj podkatalog', null, 'sfAsset'), 'document.getElementById("input_new_directory").style.display="block"') ?>
</label>
<div class="content" id="input_new_directory" style="display:none;padding-left: 1px;">
<?php echo input_tag('name', null, 'size=17') ?> <?php echo submit_tag(__('Utwórz', null, 'sfAsset')) ?>
</div>
</div>
</form>
<?php if (!$folder->isRoot() && $folder->getIsEnabled() == true): ?>
<?php echo form_tag('sfAsset/renameFolder', 'method=post') ?>
<?php echo input_hidden_tag('id', $folder->getId()) ?>
<div class="form-row" style="border: none;padding-left: 1px;">
<label for="new_folder">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/folder_edit.png', 'align=top') ?>
<?php echo link_to_function(__('Zmień nazwę katalogu', null, 'sfAsset'), 'document.getElementById("input_new_name").style.display="block";document.getElementById("new_name").focus()') ?>
</label>
<div class="content" id="input_new_name" style="display:none;padding-left: 1px;">
<?php echo input_tag('new_name', $folder->getName(), 'size=17') ?>
<?php echo submit_tag(__('Ok', null, 'sfAsset')) ?>
</div>
</form>
</div>
<?php echo form_tag('sfAsset/moveFolder', 'method=post') ?>
<?php echo input_hidden_tag('id', $folder->getId()) ?>
<div class="form-row" style="border: none;padding-left: 1px;">
<label for="new_folder">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/folder_go.png', 'align=top') ?>
<?php echo link_to_function(__('Przenieś katalog', null, 'sfAsset'), 'document.getElementById("input_move_folder").style.display="block"') ?>
</label>
<div class="content" id="input_move_folder" style="display:none;padding-left: 1px;">
<?php echo select_tag('new_folder', options_for_select(sfAssetFolderPeer::getAllNonDescendantsPaths($folder), $folder->getParentPath()), 'style=width:170px') ?>
<?php echo submit_tag(__('Ok', null, 'sfAsset')) ?>
</div>
</div>
</form>
<div class="form-row" style="border: none;padding-left: 1px;">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/folder_delete.png', 'align=top') ?>
<?php echo link_to(__('Usuń katalog', null, 'sfAsset'), 'sfAsset/deleteFolder?id='.$folder->getId(), array(
'post' => true,
'confirm' => __('Czy jesteś pewien?', null, 'sfAsset'),
)) ?>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,50 @@
<?php use_helper('Javascript') ?>
<div class="form-row" style="border: none;padding-left: 1px;">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/magnifier.png', 'align=top') ?>
<?php echo link_to_function(
__('Szukaj', null, 'sfAsset'),
'document.getElementById("sf_asset_search").style.display="block"'
) ?>
</div>
<?php echo form_tag('sfAsset/search', array('method' => 'get', 'id' => 'sf_asset_search', 'style' => 'display:none')) ?>
<div style="border: none;padding-left: 1px;">
<label for="search_params_rel_path"><?php echo __('Folder:', null, 'sfAsset') ?></label>
<div class="content">
<?php echo select_tag('search_params[path]', '<option></option>'.options_for_select(sfAssetFolderPeer::getAllPaths(), isset($search_params['path']) ? $search_params['path'] : null), 'style=width:200px') ?>
</div>
</div>
<div style="border: none;padding-left: 1px;">
<label for="search_params_name"><?php echo __('Nazwa pliku:', null, 'sfAsset') ?></label>
<div class="content">
<?php echo input_tag('search_params[name]', isset($search_params['name']) ? $search_params['name'] : null, 'size=20') ?>
</div>
</div>
<div style="border: none;padding-left: 1px;">
<label for="search_params_created_at"><?php echo __('Data modyfikacji:', null, 'sfAsset') ?></label>
<div class="content">
<?php echo input_date_range_tag('search_params[created_at]', isset($search_params['created_at']) ? $search_params['created_at'] : null, array (
'rich' => true,
'withtime' => true,
'calendar_button_img' => '/sf/sf_admin/images/date.png',
)) ?>
</div>
</div>
<div style="border: none;padding-left: 1px;">
<label for="search_params_description"><?php echo __('Opis:', null, 'sfAsset') ?></label>
<div class="content">
<?php echo input_tag('search_params[description]', isset($search_params['description']) ? $search_params['description'] : null, 'size=20') ?>
</div>
</div>
<?php include_partial('sfAsset/search_custom', array('search_params' => isset($search_params) ? $search_params : array())) ?>
<ul class="sf_admin_actions">
<li><?php echo submit_tag(__('Szukaj', null, 'sfAsset'), 'name=search class=sf_admin_action_filter') ?></li>
</ul>
</form>

View File

@@ -0,0 +1,14 @@
<?php use_helper('sfAsset') ?>
<div class="form-row" style="border: none">
<?php $sort = $sf_user->getAttribute('sort', 'name', 'sf_admin/sf_asset/sort') ?>
<label style="width: 150px">
<?php echo image_tag('/plugins/sfAssetsLibraryPlugin/images/text_linespacing.png', 'align=top') ?>
<?php if ($sort == 'name'): ?>
<?php echo __('Sortuj po nazwie', null, 'sfAsset') ?>
<?php echo link_to_asset(__('Sortuj po dacie', null, 'sfAsset'), 'sfAsset/'.$sf_params->get('action').'?dir='.$sf_params->get('dir'), array('query_string' => 'sort=date')) ?>
<?php else: ?>
<?php echo __('Sortuj po dacie', null, 'sfAsset') ?>
<?php echo link_to_asset(__('Sortuj po nazwie', null, 'sfAsset'), 'sfAsset/'.$sf_params->get('action').'?dir='.$sf_params->get('dir'), array('query_string' => 'sort=name')) ?>
<?php endif ?>
</label>
</div>

View File

@@ -0,0 +1,5 @@
<?php if(isset($sf_asset)): ?>
<?php //echo content_tag('a', $thumbnail, array('href' => $web_abs_current_path.'/'.$name, 'target' => '_blank')) ?>
<?php echo image_tag($sf_asset->getPath(E)) ?>
<?php endif;

View File

@@ -0,0 +1,29 @@
<?php use_helper('Validation', 'I18N') ?>
<h1><?php echo __('Create a new folder', null, 'sfAsset') ?></h1>
<?php include_partial('sfAsset/create_folder_header') ?>
<?php echo form_tag('sfAsset/createFolder') ?>
<fieldset>
<div class="form-row" style="border: none">
<label for="parent_folder"><?php echo __('Place under:', null, 'sfAsset') ?></label>
<?php echo select_tag('parent_folder', options_for_select(sfAssetFolderPeer::getAllPaths(), $sf_params->get('parent_folder'))) ?>
</div>
<div class="form-row<?php if ($sf_request->hasError('name')): ?> form-error<?php endif; ?>">
<?php if ($sf_request->hasError('name')): ?>
<?php echo form_error('name', array('class' => 'form-error-msg')) ?>
<?php endif; ?>
<label for="name"><?php echo __('New folder name:', null, 'sfAsset') ?></label>
<?php echo input_tag('name') ?>
</div>
</fieldset>
<?php include_partial('edit_actions') ?>
</form>
<?php include_partial('sfAsset/create_folder_footer') ?>

View File

@@ -0,0 +1,27 @@
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<?php use_helper('I18N', 'Date', 'Text', 'stAdminGenerator') ?>
<?php echo st_get_admin_head('sfAsset', __('Biblioteka mediów'), __('Zarządzanie mediami w sklepie'), array(1 => 'stProduct', 2 => 'stWebpagePlugin')) ?>
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<?php use_helper('I18N', 'Date')?>
<h1><?php echo __('Asset edition', null, 'sfAsset') ?></h1>
<?php include_partial('sfAsset/edit_header', array('sf_asset' => $sf_asset)) ?>
<div id="sf_asset_bar" style="border: none">
<?php if ($sf_flash->has('notice')): ?>
<br /><br />
<?php endif; ?>
<?php include_partial('sfAsset/sidebar_edit', array('sf_asset' => $sf_asset)) ?>
</div>
<div id="sf_asset_container">
<?php include_partial('sfAsset/messages', array('sf_asset' => $sf_asset)) ?>
<?php include_partial('sfAsset/edit_form', array('sf_asset' => $sf_asset)) ?>
</div>
<?php include_partial('sfAsset/edit_footer', array('sf_asset' => $sf_asset)) ?>
<?php echo st_get_admin_foot() ?>

View File

@@ -0,0 +1,65 @@
<div id="container">
<div class="frame" style="float: left; width: 940px;">
<div class="frame_container">
<div class="frame_header">
<div class="frame_left">
<div class="frame_right"></div>
</div>
</div>
<div class="frame_content">
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<?php use_helper('I18N')?>
<h1><?php echo __('Asset Library', null, 'sfAsset') ?></h1>
<?php if (!$popup) : ?>
<?php include_partial('list_header', array('folder' => $folder)) ?>
<?php endif; ?>
<div id="sf_asset_bar">
<p><?php echo $folder->getName() ?></p>
<?php if ($nb_dirs || $nb_files): ?>
<?php if ($nb_dirs): ?>
<p><?php echo format_number_choice('[1]Jeden katalog|(1,+Inf) Liczba katalogów: %nb%', array('%nb%' => $nb_dirs), $nb_dirs, 'sfAsset') ?></p>
<?php endif; ?>
<?php if ($nb_files): ?>
<p><?php echo format_number_choice('[1]Jeden plik, %weight% Kb|(1,+Inf]plików: %nb% , %weight% Kb', array('%nb%' => $nb_files, '%weight%' => $total_size), $nb_files, 'sfAsset') ?></p>
<?php endif; ?>
<?php endif; ?>
<?php include_partial('sfAsset/sidebar_sort') ?>
<?php include_partial('sfAsset/sidebar_search') ?>
<?php include_partial('sfAsset/sidebar_list', array('folder' => $folder, 'parent_folder' => $parent_folder)) ?>
</div>
<div id="sf_asset_container">
<?php include_partial('sfAsset/messages') ?>
<?php include_partial('sfAsset/list', array(
'folder' => $folder,
'dirs' => $dirs,
'files' => $files
)) ?>
</div>
<?php if (!$popup) : ?>
<?php include_partial('sfAsset/list_footer', array('folder' => $folder)) ?>
<?php endif; ?>
</div>
<br class="st_clear_all" />
<div class="frame_footer">
<div class="frame_left">
<div class="frame_right"></div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,39 @@
<?php use_stylesheet('/sf/sf_admin/css/main') ?>
<?php use_stylesheet('/plugins/sfAssetsLibraryPlugin/css/backend.css') ?>
<?php use_helper('I18N', 'Date', 'Text', 'stAdminGenerator') ?>
<?php if (!$popup) : ?>
<?php echo st_get_admin_head('sfAsset', __('Biblioteka mediów'), __('Zarządzanie mediami w sklepie'), array(1 => 'stProduct', 2 => 'stWebpagePlugin')) ?>
<?php include_partial('list_header', array('folder' => $folder)) ?>
<?php endif; ?>
<div id="sf_asset_bar">
<p><?php echo $folder->getName() ?></p>
<?php if ($nb_dirs || $nb_files): ?>
<?php if ($nb_dirs): ?>
<p><?php echo format_number_choice('[1]Jeden katalog|(1,+Inf) Liczba katalogów: %nb%', array('%nb%' => $nb_dirs), $nb_dirs, 'sfAsset') ?></p>
<?php endif; ?>
<?php if ($nb_files): ?>
<p><?php echo format_number_choice('[1]Jeden plik, %weight% Kb|(1,+Inf]plików: %nb% , %weight% Kb', array('%nb%' => $nb_files, '%weight%' => $total_size), $nb_files, 'sfAsset') ?></p>
<?php endif; ?>
<?php endif; ?>
<?php include_partial('sfAsset/sidebar_sort') ?>
<?php include_partial('sfAsset/sidebar_search') ?>
<?php include_partial('sfAsset/sidebar_list', array('folder' => $folder, 'parent_folder' => $parent_folder)) ?>
</div>
<div id="sf_asset_container">
<?php include_partial('sfAsset/messages') ?>
<?php include_partial('sfAsset/list', array(
'folder' => $folder,
'dirs' => $dirs,
'files' => $files
)) ?>
</div>
<?php if (!$popup) : ?>
<?php include_partial('sfAsset/list_footer', array('folder' => $folder)) ?>
<?php echo st_get_admin_foot() ?>
<?php endif; ?>

View File

@@ -0,0 +1,28 @@
<?php use_helper('I18N') ?>
<h1><?php echo __('Mass upload files', null, 'sfAsset') ?></h1>
<?php include_partial('sfAsset/create_folder_header') ?>
<?php echo form_tag('sfAsset/massUpload', 'method=post multipart=true') ?>
<fieldset>
<div class="form-row" style="border: none">
<label for="parent_folder"><?php echo __('Place under:', null, 'sfAsset') ?></label>
<?php echo select_tag('parent_folder', options_for_select(sfAssetFolderPeer::getAllPaths(), $sf_params->get('parent_folder'))) ?>
</div>
<?php for($i = 1; $i <= sfConfig::get('app_sfAssetsLibrary_mass_upload_size', 5) ; $i++): ?>
<div class="form-row" style="border: none">
<label for="files_1"><?php echo __('File %nb%:', array('%nb%' => $i), 'sfAsset') ?></label>
<?php echo input_file_tag('files['.$i.']') ?>
</div>
<?php endfor; ?>
</fieldset>
<?php include_partial('edit_actions') ?>
</form>
<?php include_partial('sfAsset/create_folder_footer') ?>

View File

@@ -0,0 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<?php include_http_metas() ?>
<?php include_metas() ?>
<?php include_title() ?>
<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body style="background: #fff">
<div id="page" style="background: #fff">
<?php echo $sf_data->getRaw('sf_content') ?>
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<?php use_helper('sfAsset', 'Date', 'I18N') ?>
<h1><?php echo __('Search results', null, 'sfAsset') ?></h1>
<?php if (!$popup) : ?>
<?php include_partial('search_header') ?>
<?php endif; ?>
<div id="sf_asset_bar">
<p><?php echo link_to(__('Back to the list', null, 'sfAsset'), 'sfAsset/list') ?></p>
<?php include_partial('sfAsset/sidebar_sort') ?>
<?php include_partial('sfAsset/sidebar_search', array('search_params' => $search_params)) ?>
</div>
<div id="sf_asset_container">
<?php foreach ($pager->getResults() as $sf_asset): ?>
<div class="search_result" style="clear:left">
<?php include_partial('sfAsset/asset', array('sf_asset' => $sf_asset, 'server' => stSoteshop::getServerName())) ?>
<div class="details">
<?php echo assets_library_breadcrumb($sf_asset->getFolderPath(ESC_RAW), true, 'list') ?><?php echo link_to_asset_action($sf_asset->getFilename(), $sf_asset) ?><br />
<?php if ($description = $sf_asset->getDescription(ESC_RAW)): ?>
<?php echo $description ?><br />
<?php endif; ?>
<?php if ($copyright = $sf_asset->getCopyright(ESC_RAW)): ?>
<?php echo __('Copyright: %copyright%', array('%copyright%' => $copyright), 'sfAsset') ?><br />
<?php endif; ?>
<?php if ($author = $sf_asset->getAuthor(ESC_RAW)): ?>
<?php echo __('Author: %author%', array('%author%' => $author), 'sfAsset') ?><br />
<?php endif; ?>
<?php echo __('Created on %date%', array('%date%' => format_date($sf_asset->getCreatedAt('U'))), 'sfAsset') ?>
</div>
</div>
<?php endforeach; ?>
</div>
<div class="sf_asset_pager" style="clear: both">
<?php if ($pager->haveToPaginate(ESC_RAW)): ?>
<?php if ($pager->getPage(ESC_RAW) != 1): ?>
<?php echo link_to(__('< Previous page', null, 'sfAsset'), 'sfAsset/search?page='.$pager->getPreviousPage()) ?>
<?php endif; ?>
<?php echo __('Page %number% on %total%', array('%number%' => $pager->getPage(), '%total%' => $pager->getLastPage()), 'sfAsset') ?>
<?php if ($pager->getPage() != $pager->getLastPage()): ?>
<?php echo link_to(__('Next page >', null, 'sfAsset'), 'sfAsset/search?page='.$pager->getNextPage()) ?>
<?php endif; ?>
<?php endif ?>
</div>
<?php if (!$popup) : ?>
<?php include_partial('sfAsset/search_footer') ?>
<?php endif; ?>

View File

@@ -0,0 +1,99 @@
<?php use_helper('Javascript', 'I18N', 'sfAsset') ?>
<p><?php echo button_to_function(__('Back to the list', null, 'sfAsset'), 'history.back()') ?></p>
<script src="/js/tiny_mce/tiny_mce_popup.js"></script>
<script src="/js/tiny_mce/plugins/sfAssetsLibrary/jscripts/sfAssetsLibrary.js"></script>
<?php echo form_tag('', 'id=tinyMCE_insert_form') ?>
<fieldset>
<?php echo asset_image_tag($sf_asset, 'large', array('class' => 'thumb')) ?>
<div class="form-row" style="border: 0px solid black">
<label><?php echo __('Filename:', null, 'sfAsset'); ?></label>
<div class=""><?php echo $sf_asset->getUrl() ?></div>
</div>
<div class="form-row" style="border: none">
<label><?php echo __('Copyright:'); ?></label>
<div class="content"><?php echo input_tag('alt'.$sf_asset->getId(), $sf_asset->getCopyright(), 'size=80') ?></div>
</div>
<div class="form-row" style="border: none">
<label><?php echo __('Image size:', null, 'sfAsset'); ?></label>
<?php
list($widthoriginal, $heightoriginal, $type, $attr) = getimagesize(sfConfig::get('sf_web_dir').$sf_asset->getUrl());
list($widthsmall, $heightsmall, $type, $attr) = getimagesize(sfConfig::get('sf_web_dir').$sf_asset->getUrl('small'));
list($widthlarge, $heightlarge, $type, $attr) = getimagesize(sfConfig::get('sf_web_dir').$sf_asset->getUrl('large'));
?>
<?php echo input_hidden_tag('height0_'.$sf_asset->getId(), $heightoriginal) ?>
<?php echo input_hidden_tag('width0_'.$sf_asset->getId(), $widthoriginal) ?>
<?php echo input_hidden_tag('height1_'.$sf_asset->getId(), $heightlarge) ?>
<?php echo input_hidden_tag('width1_'.$sf_asset->getId(), $widthlarge) ?>
<?php echo input_hidden_tag('height2_'.$sf_asset->getId(), $heightsmall) ?>
<?php echo input_hidden_tag('width2_'.$sf_asset->getId(), $widthsmall) ?>
<div class="content">
<?php echo select_tag('thumbnails'.$sf_asset->getId(),
array(__('Original', null, 'sfAsset'), __('Large thumbnail', null, 'sfAsset'), __('Small thumbnail', null, 'sfAsset')),
array('onchange' =>
"var selectedWidthId = 'width' + $(this).selectedIndex + '_".$sf_asset->getId()."';" .
"var selectedHeightId = 'height' + $(this).selectedIndex + '_".$sf_asset->getId()."';" .
"$('height".$sf_asset->getId()."').value = $(selectedHeightId).value;" .
"$('width".$sf_asset->getId()."').value = $(selectedWidthId).value;"
)) ?>
</div>
</div>
<div class="form-row" style="border: none">
<label><?php echo __('Frame image', null, 'sfAsset') ?></label>
<div class="content"><?php echo checkbox_tag('border'.$sf_asset->getId(), 1, true, array(
'onclick' => 'document.getElementById(\'frame_fieldset\').style.display = this.checked ? "block" : "none";')) ?></div>
</div>
<fieldset id="frame_fieldset">
<div class="form-row" style="border: none">
<label><?php echo __('Display description', null, 'sfAsset') ?></label>
<div class="content"><?php echo checkbox_tag('legend'.$sf_asset->getId(), 1, true, array(
'onclick' => 'document.getElementById(\'legend_form_row\').style.display = this.checked ? "block" : "none";')) ?></div>
</div>
<div class="form-row" id="legend_form_row" style="border: none">
<label><?php echo __('Description:', null, 'sfAsset') ?></label>
<div class=""><?php echo input_tag('description'.$sf_asset->getId(), $sf_asset->getDescription(), 'size=80') ?></div>
</div>
<div class="form-row" style="border: none">
<label><?php echo __('Image align:', null, 'sfAsset') ?></label>
<div class="content"><?php echo select_tag('align'.$sf_asset->getId(), array(
'left' => 'gauche',
'center' => 'centre',
'right' => 'droite'
)) ?></div>
</div>
<div class="form-row" style="border: none">
<label><?php echo __('Width (%):', null, 'sfAsset') ?></label>
<div class="content"><?php echo input_tag('width'.$sf_asset->getId(), 50, 'size=5') ?></div>
</div>
</fieldset>
<ul class="sf_admin_actions">
<li>
<?php echo button_to_function(__('Insert', null, 'sfAsset'),
"insertAction(
'".$sf_asset->getUrl()."',
$('alt".$sf_asset->getId()."').value,
$('border".$sf_asset->getId()."').checked,
$('legend".$sf_asset->getId()."').checked,
$('description".$sf_asset->getId()."').value,
$('align".$sf_asset->getId()."').value,
$('thumbnails".$sf_asset->getId()."').selectedIndex,
$('width".$sf_asset->getId()."').value
)",'class=sf_admin_action_save') ?>
</li>
</ul>
</fieldset>
</form>

View File

@@ -0,0 +1,24 @@
<div style="width: 300px;height: 500px; border: 1px solid green">
<div style="float: right; width: 100px;height: 100px;border: 1px solid black">
to jest tekst po lewej stronie na stale
</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div><br>
<div style="float: left;display: block; height: 50px; width: 50px; border: 3px solid blue;">&nbsp;</div>
</div>