paginagmbh / redmine_lightbox2

Lightbox for image attachments in Redmine
MIT License
126 stars 97 forks source link

DMSF support: add id to image label #73

Closed tofi86 closed 4 years ago

tofi86 commented 4 years ago

From @dinya at https://github.com/paginagmbh/redmine_lightbox2/issues/64#issuecomment-538729985:

@tofi86

Could you add dmsf file ID to image label (something like [<id>] <title>)?

Use case. I found the image of interest in the slide preview and wanna link to it in some issue or wiki page with {{dmsftn(id)}}.

Currently I should remember the title (label), close preview and find ID by title in the files list. And then I can add the link. But the ID presence in the label in the bottom prevents this three unnecessary steps (remember, close and find).

What do you think?

tofi86 commented 4 years ago

grafik

Support added for both Redmine 4 (branch master) and Redmine 3.4 (branch redmine-3.4).

dinya commented 4 years ago

@tofi86

I updated with the current redmine-3.4 branch, but there is no ID in the image label (DMS tab),

изображение

Label with dmsf id is ok in the issue page (like on your screenshot above).

My env:

Item Version
Redmine version 3.4.11.stable
Ruby version 2.3.3-p222 (2016-11-21) [x86_64-linux]
redmine_lightbox2 0.4.5
redmine_dmsf 1.6.2
tofi86 commented 4 years ago

Did you run the plugin migrations?

dinya commented 4 years ago

Yes, as usual with

bundle exec rake redmine:plugins:migrate RAILS_ENV="production"
tofi86 commented 4 years ago

Now I get it. it works in issues but not in DMS tab. sorry.

I added #74 for that.