[Solved] [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Discuss using and your tips/tricks for BookCAT
User avatar
Alex Ivanovich
Posts: 295
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by Alex Ivanovich » Sun Dec 13, 2015 10:18 pm

LotsOCds wrote:
if you can improve or simplify the code
Simplified.
I would only see one icon if Biography and complete (displayed in BookBrowse for Contents)
Only one will show. If an author is also in the credits then they will be counted twice. It is possible to prevent but that is a complex programming task, should be rare, and will not be fixed. You can put the icon back into a <td></td> if you want.
in "Common.xsl" I would remove the count
Gone.
Explorer Templates.zip
Hi Dave,
bad news :|
I noticed that something is wrong :|

in the first screenshot (code before the change of attachment mentioned here) is displayed for the "Authors" the "Incomplete Biography" as a warning "BookBrowse" and the icon "person_ok.png" (for Complete Biography) for "Credits "
That's right,
then I asked for a change, if the "authors" and "Credits" had the "Complete Biography" that appeared the icon "person_okp.ng" only once

Image

in the second screenshot (code after the change) will display the warning "Biography Incomplete" for
"Authors", but does not display the icon "person_ok.png" (for Complete Biography) for the "Credits"
this is wrong
It should be visible, and after completing the tab "Incomplete Biography"
should be visible one icon "person_ok.png" (for Complete Biography)

Image

thank you

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by LotsOCds » Mon Dec 14, 2015 3:12 pm

That is not good. Apparently I misunderstood you and thought you wanted only one icon/warning. That is what the code does. Unfortunately I will not have time to re-work this until after the holidays. My suggestion is that you use the code the gives you two warnings or icons as shown in your top screenshot.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 295
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by Alex Ivanovich » Mon Dec 14, 2015 3:41 pm

I will use the code unchanged, for now
Ibe waiting, when you'll have time to complete it

Thank you

User avatar
Alex Ivanovich
Posts: 295
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by Alex Ivanovich » Mon Dec 21, 2015 2:20 pm

and can be removed in doctitle the warning

Image

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by LotsOCds » Sat Jan 09, 2016 3:34 am

I will use the code unchanged, for now
Ibe waiting, when you'll have time to complete it
Try the attached. It does what we discussed before the holidays.
and can be removed in doctitle the warning
I do not see this. The content for the example posted above does not exist in the database you sent me.
BookBrowse.zip
(13.09 KiB) Downloaded 35 times
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 295
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by Alex Ivanovich » Sat Jan 09, 2016 10:37 am

in "doctitle" it appears "the warning" of biographies :|

search "Super Almanacco Paperino (prima serie) number 14
contents 02 "Tippete e i sette nani" ;)


Image

Image

thanks for the code Dave ;)
I have to testing to see if it works

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by LotsOCds » Sat Jan 09, 2016 3:43 pm

Alex Ivanovich wrote:in "doctitle" it appears "the warning" of biographies
This happens because there is no doctitle given in the link to the Contents.xsl template. When there is no doctitle Contents.xsl will generate one by calling the template format-author (which is in Common.xsl). You have made changes to that template which do not work for doctitle. The best way to fix this is to provide an explicit doctitle in the link.

In BookBrowse.xsl change this:

Code: Select all

	<td class="list_table_fieldvalue">
      <a href="Contents.xsl?ID={@id}" target="_blank">
        <xsl:value-of select="title"/>
      </a>
to this:

Code: Select all

	<td class="list_table_fieldvalue">
      <a href="Contents.xsl?ID={@id}@xslparam:doctitle={title}" target="_blank">
        <xsl:value-of select="title"/>
      </a>
You can change the doctitle to be another field (or fields) if you prefer.
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 295
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by Alex Ivanovich » Sat Jan 09, 2016 4:04 pm

Hi, Dave

I would like to see in "doctitle" (Contents) these fields
:|
Title
<xsl:value-of select="/data/record/contentsdata/title"/><

Original Title
<xsl:value-of select="/data/record/contentsdata/originaltitle"/>

copyrightdate / @ year
<xsl:value-of select="/data/record/contentsdata/copyrightdate/@year"/>

this does not work :|

Code: Select all

  <td class="list_table_fieldvalue">
      <a href="Contents.xsl?ID={@id}@xslparam:doctitle={title}{originaltitle} {copyrightdate/@year}" target="_blank">
        <xsl:value-of select="title"/>
		<xsl:value-of select="originaltitle"/>
		<xsl:value-of select="copyrightdate/@year"/>
      </a>
this does not work :|

Code: Select all

<td class="list_table_fieldvalue">
      <a href="Contents.xsl?ID={@id}@xslparam:doctitle={title}{originaltitle} {copyrightdate/@year}" target="_blank">
        <xsl:value-of select="title"/>
		<xsl:value-of select="/data/record/contentsdata/originaltitle"/>
		<xsl:value-of select="/data/record/contentsdata/copyrightdate/@year"/>
      </a>

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by LotsOCds » Sat Jan 09, 2016 4:46 pm

Alex Ivanovich wrote:Title
<xsl:value-of select="/data/record/contentsdata/title"/><

Original Title
<xsl:value-of select="/data/record/contentsdata/originaltitle"/>

copyrightdate / @ year
<xsl:value-of select="/data/record/contentsdata/copyrightdate/@year"/>
These xpaths are not correct but I think I understand what you are asking. Also, there is no copyrightdate in the xml. I used the bookdata/publishdate instead.

Code: Select all

	<td class="list_table_fieldvalue">
      <a href="Contents.xsl?ID={@id}@xslparam:doctitle={title}, {originaltitle}, {/data/record/bookdata/publishdate/@year}" target="_blank">
        <xsl:value-of select="title"/>
      </a>
Cheers,
Dave

User avatar
Alex Ivanovich
Posts: 295
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: [Repost] Red icons warning with counting, for "Credits" no biography in "Contents"

Post by Alex Ivanovich » Sat Jan 09, 2016 5:23 pm

perfect, it works perfectly, but I had no doubt :D

great work Dave :)

I will not finish 'ever thank you, for helping me ;)

I think this topic and considered "solved" :)

Ciao

Post Reply