[Solved] icon in Contents

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

[Solved] icon in Contents

Post by Alex Ivanovich » Thu Sep 10, 2015 2:04 pm

hi to all
I need a little help
I need to display icons (red icon to indicate that there are people without biography) in the same row of the Contents :roll:

place the original code posted by LotsOCds (Dave)

Code: Select all

    
       (Add this at the top of BookBrowse.xsl right below the other similar lines.)
           <?data lookuptable="person"?> --> 

Code: Select all

<!-- Info alert for Author (Biography) if empty-->
       <xsl:if test="string-length(lookupdata/biography)=0">
        <a href="CMD:EDIT:person,{@id}">  (<strong><span style="color:red;">*</span></strong>) </a>
         </xsl:if>
        <!-- Info alert for Author (Biography) if empty-->


       
       
<!-- Info alert con icona for Author (Biography) if completed -->
       
           <xsl:if test="string-length(lookupdata/biography)>0"> (<img class="index_image" src="person_ok.png"/>)
            </xsl:if>
          
       <!-- Info alert con icona for Author (Biography) if completed -->
thanks to those who can help me
Attachments
SS Screen Capture #050.png
SS Screen Capture #050.png (185.61 KiB) Viewed 1112 times
Last edited by Alex Ivanovich on Sat Sep 19, 2015 4:11 pm, edited 1 time in total.

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

Re: icon in Contents

Post by LotsOCds » Sat Sep 12, 2015 11:25 pm

Alex,

We did this before. Isn't the code I gave you still in the format-credits template in your Common.xsl?
Cheers,
Dave

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

Re: icon in Contents

Post by Alex Ivanovich » Sun Sep 13, 2015 2:25 pm

LotsOCds wrote:Alex,

We did this before. Isn't the code I gave you still in the format-credits template in your Common.xsl?
hello Dave, how are you?
We've done before, and it works perfectly :)
Now I moved the contents under the title, when I put the stories in the comics there are also people


the contents are these

1. The black cat
2. the band of the zodiac
3 ect ...

in the story "The Black Cat" is missing the biography of an author (marked in red)
I would get a warning (red icon) on the line of the titles of "content", which tells me that in that story and not an author biography (without opening all the cards to control)

I tried to insert the code but the red icon is displayed in all rows

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

Re: icon in Contents

Post by LotsOCds » Sun Sep 13, 2015 4:36 pm

I put the same code in the format-author template in your Common.xsl. You want to call that template and not try to put the code directly into your BookBrowse.xsl.
Cheers,
Dave

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

Re: icon in Contents

Post by Alex Ivanovich » Sun Sep 13, 2015 5:42 pm

LotsOCds wrote:I put the same code in the format-author template in your Common.xsl. You want to call that template and not try to put the code directly into your BookBrowse.xsl.
:oops: :roll: :roll: :?: :?:
the problem and do not know where to put the code
and in which template

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

Re: icon in Contents

Post by LotsOCds » Sun Sep 13, 2015 5:48 pm

Please look back at the BookBrowse.xsl and Common.xsl files I've sent you in the past. The code is all there and it works fine as-is in the Contents section of BookBrowse.xsl. You don't need to make any changes. Once you see it working you can move the Contents section to display where your want.
Cheers,
Dave

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

Re: icon in Contents

Post by Alex Ivanovich » Sun Sep 13, 2015 6:18 pm

the code works
and the problem that I see the red icon in the row where there is no biography of the person
in this case the red icon must be visible to the right in the row of the field "the black cat" (il gatto nero) (to signal me that I have to open that tab)

(sorry for my terrible English, I help with google)

and this code must be visible where the red icon

Code: Select all

<!-- Content moved under the title (code by Fredrik -->
		
		<xsl:if test="numberofsections>0">
           <tr> 
             <td class="record_pane_table_group" colspan="2"><!--Contents--><center>Storie contenute nell'albo</center></td>
           </tr>
           <tr>
             <td class="record_pane_table_group_padding" colspan="2"></td>
           </tr>
           <tr>  
             <td colspan="2">
               <table class="record_pane_table" cellspacing="1" cellpadding="0" with="100%">
                 <xsl:apply-templates select="/data/record/contentsdata"/>
               </table>    
             </td>
            </tr>                  
         </xsl:if>      

		<!-- Content moved under the title (code by Fredrik -->

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

Re: icon in Contents

Post by LotsOCds » Sun Sep 13, 2015 6:34 pm

in this case the red icon must be visible to the right in the row of the field "the black cat" (il gatto nero) (to signal me that I have to open that tab)
Your screenshot does not show an author next to "il gatto nero". The red icon is shown when when the author is displayed.
Cheers,
Dave

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

Re: icon in Contents

Post by Alex Ivanovich » Sun Sep 13, 2015 6:44 pm

the red icon is displayed when an author (or authors) missing biography
(I need only see this)

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

Re: icon in Contents

Post by LotsOCds » Sun Sep 13, 2015 6:52 pm

The code I provided requires the author to be shown.
Cheers,
Dave

Post Reply