Modify

Opened 17 years ago

Closed 16 years ago

Last modified 12 years ago

#2645 closed enhancement (fixed)

RFE: Add "Name" to screenshots in preview window

Reported by: izzy Owned by: Radek Bartoň
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

In the screenshots preview window ("/screenshots"), it would be nice to see the name of the pictures attached to them (between the picture and the "edit" and "delete" links). This makes it easier to identify the screenshot behind the thumbnail

Attachments (2)

ss_matrix_name.patch (540 bytes) - added by izzy 16 years ago.
Patch to display screenshot name in matrix view
ss_matrix_css.patch (170 bytes) - added by izzy 16 years ago.
Stylesheet patch for screenshot name in matrix view

Download all attachments as: .zip

Change History (11)

comment:1 Changed 17 years ago by Radek Bartoň

Status: newassigned

Accepting...

comment:2 Changed 16 years ago by izzy

Radek,

may I push this once more again? Just workin on a wiki with a bunch of sub-sections and screenshots, it is not easy to tell what you see in the preview window ;)

comment:3 Changed 16 years ago by izzy

Well, it's done so easily! Just one line to add in templates/screenshots-matrix-view.cs before line 26, so it looks like:

                  <?cs if:image.id != -1 ?>
                    <div class="ss_name"><?cs var:image.name ?></div>
                    <a href="<?cs var:screenshots.href ?>?action=edit;id=<?cs var:image.id ?>;index=<?cs var:screenshots.index ?>">Edit</a>
                    <a href="<?cs var:screenshots.href ?>?action=delete;id=<?cs var:image.id ?>;index=<?cs var:screenshots.index ?>">Delete</a>
                  <?cs else ?>

Now, formatting can be done with CSS. In htdocs/css/matrix-view.css add:

.ss_name { font-size: 75% }

And you are done - and got rid of this ticket ;)

In case someone doesn't want the name displayed then, the div can be sorted out via CSS:

div.ss_name { display: none; visibility: hidden; }

comment:4 Changed 16 years ago by izzy

Sorry, wrong place: That way it is only displayed for the admin. The additional line

<div class="ss_name"><?cs var:image.name ?></div>

belongs before line 18:

              <?cs if:image.id != -1 ?>
                <div class="image">
                  <a href="<?cs var:screenshots.href ?>/<?cs var:image.id ?>" title="<?cs var:image.name ?>">
                    <img src="<?cs var:screenshots.href ?>/<?cs var:image.id ?>?width=<?cs var:screenshots.width ?>;height=<?cs var:screenshots.height ?>;format=raw"
                      alt="<?cs var:image.description ?>" width="<?cs var:screenshots.width ?>" height="<?cs var:screenshots.height ?>"/>
                  </a>
                </div>
                <div class="ss_name"><?cs var:image.name ?></div>
              <?cs else ?>

and the CSS needs one more thing:

.ss_name { font-size: 75%; text-align:center; }

Changed 16 years ago by izzy

Attachment: ss_matrix_name.patch added

Patch to display screenshot name in matrix view

Changed 16 years ago by izzy

Attachment: ss_matrix_css.patch added

Stylesheet patch for screenshot name in matrix view

comment:5 Changed 16 years ago by Radek Bartoň

Resolution: fixed
Status: assignedclosed

I've added this to both branches exceptionally. Sorry for the delay :-).

comment:6 Changed 16 years ago by izzy

First: Yes, I'm still on 0.10.4

Second: Just found the code applied for 0.10 on a "svn up" now, thanks! I only wonder why we had to patch it in manually in the 0.11 installation yesterday, if you had that in there already? (The 0.11 is not my installation - it's a different project I'm working on).

comment:7 Changed 16 years ago by Radek Bartoň

I've added this for 0.10 and 0.11 branch few hours ago with r4305 so I quite don't understand what are you asking?

comment:8 Changed 16 years ago by izzy

Never mind - I was referring to your "original post" (I got with the notify by mail) you probably changed, and obviously misunderstood it (it sounded as if it already had been added to the 0.11 branch some time ago) - now I got it clear: It just had been added to both branches a few minutes ago :)

Sorry for the misinterpretation - and thanx for the update!

comment:9 Changed 16 years ago by Radek Bartoň

The post you are refering was for another ticket #3765.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.