Browse Source

Insert image order fix

pull/22/merge
Mark (ilosuna) 11 years ago
parent
commit
2bf94356d8
4 changed files with 24 additions and 6 deletions
  1. BIN
      cms/data/content.sqlite
  2. +1
    -1
      cms/includes/insert_thumbnail.inc.php
  3. +2
    -2
      cms/lang/ukrainian.admin.lang.php
  4. +21
    -3
      cms/templates/admin/subtemplates/modal_insert_thumbnail.tpl

BIN
cms/data/content.sqlite View File


+ 1
- 1
cms/includes/insert_thumbnail.inc.php View File

@ -22,7 +22,7 @@ if(isset($_SESSION[$settings['session_prefix'].'user_id']))
if(isset($_POST['gallery']))
{
$dbr = Database::$content->prepare("SELECT id, title, photo_thumbnail FROM ".Database::$db_settings['photo_table']." WHERE gallery=:gallery ORDER BY sequence ASC");
$dbr = Database::$content->prepare("SELECT id, title, photo_thumbnail FROM ".Database::$db_settings['photo_table']." WHERE gallery=:gallery ORDER BY gallery ASC, sequence ASC");
$dbr->bindParam(':gallery', $_POST['gallery'], PDO::PARAM_STR);
$dbr->execute();
$i=0;


+ 2
- 2
cms/lang/ukrainian.admin.lang.php View File

@ -37,7 +37,7 @@ $lang['admin_menu_page_overview'] = 'Сторінки';
$lang['admin_menu_create_page'] = 'Додати сторінку';
$lang['admin_menu_edit_menus'] = 'Меню';
$lang['admin_menu_edit_galleries'] = 'Галереї';
$lang['admin_menu_edit_notes'] = 'Замітки';
$lang['admin_menu_edit_notes'] = 'Нотатки';
$lang['admin_menu_edit_gcb'] = 'Блоки';
$lang['admin_menu_edit_comments'] = 'Комментарі';
$lang['admin_menu_filemanager'] = 'Файли';
@ -350,7 +350,7 @@ $lang['user_name'] = 'Ім\'я';
$lang['user_type'] = 'Роль';
$lang['type_0'] = 'Редактор';
$lang['type_1'] = 'Адмінистратор';
$lang['last_login'] = 'Останній вход';
$lang['last_login'] = 'Останній вхід';
$lang['no_users'] = 'Немає користувачів.';
$lang['create_user_account'] = 'Створити нового користувача';
$lang['user_name_m'] = 'Ім\'я користувача:';


+ 21
- 3
cms/templates/admin/subtemplates/modal_insert_thumbnail.tpl View File

@ -7,11 +7,29 @@
<div class="form-group">
<select id="thumbnailselect" class="form-control" size="20">
<?php foreach ($thumbnails as $thumbnail): ?>
<option value="<?php echo $thumbnail['id']; ?>"><?php echo $thumbnail['title']; ?>
(<?php echo $thumbnail['gallery']; ?>)
<?php
$previous_gallery = isset($current_gallery) ? $current_gallery : false;
$current_gallery = $thumbnail['gallery'];
?>
<?php if($current_gallery!=$previous_gallery): ?>
<?php if($previous_gallery): ?>
</optgroup>
<?php endif; ?>
<optgroup label="<?php echo $current_gallery; ?>">
<?php endif; ?>
<option value="<?php echo $thumbnail['id']; ?>">
<?php echo $thumbnail['title']; ?>
</option>
<?php if($current_gallery!=$previous_gallery): ?>
<?php endif; ?>
<?php endforeach; ?>
</select>
</optgroup> </select>
</div>
<div class="form-group">
<label for="image_class"><?php echo $lang['insert_image_class']; ?></label>


Loading…
Cancel
Save