#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)
Change History (11)
comment:1 Changed 17 years ago by
Status: | new → assigned |
---|
comment:2 Changed 16 years ago by
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
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
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
Attachment: | ss_matrix_name.patch added |
---|
Patch to display screenshot name in matrix view
Changed 16 years ago by
Attachment: | ss_matrix_css.patch added |
---|
Stylesheet patch for screenshot name in matrix view
comment:5 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've added this to both branches exceptionally. Sorry for the delay :-).
comment:6 Changed 16 years ago by
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
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
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!
Accepting...