When uploading images or managing images and on the page where the title, caption, and gallery can be entered for each image, the node is too wide and extends off the right side of my screen on a 1024x768 monitor. I am using a 2 column theme with a narrow sidebar.

Apparently, when the column for selecting the Gallery from the listbox was added to the template, the other cell elements were not adjusted to keep the table width from being too large. Firebug shows that the table is 976px wide in my Simply Modern theme.

One possible fix would be to move the Gallery listbox selector to the same column as the title and caption or maybe place it under the thumbnail.

CommentFileSizeAuthor
#10 nodegallerymanage.jpg37.77 KBdbeall
#7 node_gallery-500460.patch3.19 KBkmonty
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dddave’s picture

Status: Active » Closed (duplicate)
dddave’s picture

Status: Closed (duplicate) » Active

Sorry.

peťo’s picture

I have same problem with Garland 3 column layout

kmonty’s picture

Title: Upload/Manage Images node template too wide » Make the Upload/Manage Images template narrower
Assigned: Unassigned » kmonty
Category: bug » task

Yes, we should change this.

Tally’s picture

I am using Node Gallery in my production site and the drop down box to set the Gallery for each image on the Upload images and Manage images pages is very disruptive. The column makes the page too wide to display on a 1024px wide screen. Second, I do not want my users to be able to move their images between galleries because each user has their own gallery and the drop down box allows images to be moved to any gallery currently existing. edit: only true 'cuz signed in as admin.

I made two changes to get rid of the Gallery column on the Upload images and Manage images pages.

First, in the July 29 version of theme.inc file I replaced line 130

- $header = array('', t('Delete'), t('Thumbnail'), t('Edit'), t('Weight'), t('Gallery'), t('Cover'));
  foreach (element_children($form['files']) as $key) {
    // Add class to group weight fields for drag and drop.
    $form['files'][$key]['weight']['#attributes']['class'] = 'upload-weight';

with

+ // TALLY  - make column header zero width
+ $header = array('', t('Delete'), t('Thumbnail'), t('Edit'), t('Weight'), t(''), t('Cover'));
  foreach (element_children($form['files']) as $key) {
    // Add class to group weight fields for drag and drop.
    $form['files'][$key]['weight']['#attributes']['class'] = 'upload-weight';
+   // TALLY - add class for column data - add css to set display: none for the class
+   $form['files'][$key]['gid']['#attributes']['class'] = 'form_gallery_id';  

These lines zeroed out the Gallery column header and added a class for the data in the column. I then added the following class definition to my css file.

/* Node Gallery - hide gallery selector from Upload/Manage Images form */
.form_gallery_id {
  display: none;
}

The css class definition hides the display of the data in the column. In this case, the data being hid is the drop down box of gallery names. Because the form element is still there, the gid variable is being set and data integrity is maintained.

This is not an elegant hack, but it gets my site closer to what I want. If I knew Drupal better, I would either make the display of that column optional from the admin settings page or, preferably, make the column heading hideable through css the same as the data column is hideable. Another possibility is to assign a permission to allowing the gallery to be changed for each individual image.

nikolajb’s picture

Thanks for the suggestion. I added the hack, although I'm not much of a fan of hacking a production site :). Definately helps, but I certainly hope there's an official solution to this in the near future :).

Now the page only interferes with the blocks that are visible because the URL looks like a node (node/718/edit), but that's for another bug report, I guess :)

kmonty’s picture

Status: Active » Needs review
FileSize
3.19 KB

This is my first attempt at solving this problem (note this applies against HEAD, which I do not think has been rolled into a dev tarball yet).

1) I moved the gallery selection column to the bottom of the node editing column
2) Wrapped the imagecache thumb with a span
3) Forced the imagecache thumb to have a width of 100px

Thoughts?

I feel like the node form is becoming too long. I might have to make a second "manage images" tab that is just for reordering/selecting covers. Possibly called "Sort Images"

kmonty’s picture

Priority: Normal » Critical

I see this as a critical UI problem. Maybe not a release blocker, but it is high on my list.

dbeall’s picture

That was a thought I had about sorting when using fields on manage images page.
It already uses more space than a small thumbnail takes.

dbeall’s picture

FileSize
37.77 KB

this looks fine

kmonty’s picture

Status: Needs review » Patch (to be ported)

Yeah, I've been liking this patch more and more.

kmonty’s picture

Status: Patch (to be ported) » Fixed

Commited

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.