Bug 962643 - RFE: Allow access to book formats in product/version templates
Summary: RFE: Allow access to book formats in product/version templates
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.2
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-14 06:46 UTC by Katie Miller
Modified: 2015-02-08 21:35 UTC (History)
6 users (show)

Fixed In Version: 3.2.0
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-09 04:48:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Katie Miller 2013-05-14 06:46:44 UTC
Description of problem:

When customising the Publican Perl template products_index.tmpl, there is no way to access the formats of a book. I would like to be able to access this information to be able to produce a table giving the link to the documents in each available format, like what can be seen on the current Customer Portal at https://access.redhat.com/site/documentation/Red_Hat_Enterprise_Linux/. Ideally, the book_list hash currently available would give access to a list of available formats for each book, so I could write something like [% FOREACH format = booker.formats %]. This information would also need to be available within the versions_index.tmpl. It might also be useful to have it available in language_index.tmpl in the future.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 5 Jeff Fearn 🐞 2013-07-08 01:19:57 UTC
%book_ver_list used to create "/$lang/$product/$version/$book/index.html" contains this data, is it OK to expose this to the other templates?

Comment 6 HSS Product Manager 2013-07-08 05:47:47 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 7 Katie Miller 2013-07-10 02:08:26 UTC
(In reply to Jeff Fearn from comment #5)
> %book_ver_list used to create "/$lang/$product/$version/$book/index.html"
> contains this data, is it OK to expose this to the other templates?

Yes, this would solve the problem for me.

Comment 8 Jeff Fearn 🐞 2013-07-10 04:06:49 UTC
Due to QE effort I limited this to the two templates requested.

To use this in products_index.tmpl

[% FOREACH format = book_ver_list.${product}.${c_book}.${ver}.formats %]<span>[% format %] </span>[%- END %]


To use this in versions_index.tmpl

[% FOREACH format = book_ver_list.${product}.${booker.value.book}.${version}.formats %]<span>[% format %] </span>[%- END %]

To get the real URLs you can copy the logic in books_format_menu.tmpl

To ssh://git.fedorahosted.org/git/publican.git
   9a7687a..b525469  HEAD -> devel

Comment 9 Tim Hildred 2013-07-23 10:07:07 UTC
Hey Katie,

I'm having a hard time figuring out how to verify this bug fix. Do you think you could help by suggesting a way that I can see what Jeff has done meets your requirements? 

Thanks for any help you can give me.

Comment 10 Katie Miller 2013-07-24 22:27:36 UTC
Hi Tim,

I will QA this bug; it's not something you can check without changing a brand.


(In reply to Tim Hildred from comment #9)
> Hey Katie,
> 
> I'm having a hard time figuring out how to verify this bug fix. Do you think
> you could help by suggesting a way that I can see what Jeff has done meets
> your requirements? 
> 
> Thanks for any help you can give me.

Comment 11 Katie Miller 2013-07-25 22:29:37 UTC
Tested on 3.1.5-0.fc18.t66.

Comment 12 Jeff Fearn 🐞 2013-08-09 04:48:38 UTC
The fix for this bug has been shipped in publican 3.2.0


Note You need to log in before you can comment on or make changes to this bug.