dervishe- / f-droid-web

A simple and lightweight webpage which aims is to present the apps stored in a f-droid repository
GNU Lesser General Public License v3.0
15 stars 6 forks source link

The template parser fail when we have cascaded if markups and first condition is false #35

Open dervishe- opened 9 years ago

dervishe- commented 9 years ago

When in a same template we have some if cascaded like here the template parser failed to analyze the bloc when the if conditions are not matching. For instance if there's no donate option, the parser will just considere:

<if placeholder="App:Donate:HasDonationOptions">
    <aside id="donate_app" class="info">
        <if placeholder="App:Donate:Link">
            <a title="[Text:Donate]" href="[App:Donate:Link]">[Text:Donate]</a>
        </if>

as a first bloc

<if placeholder="App:Donate:FlattrLink">
    <a title="[Text:Donate]: [Text:Flattr]" href="[App:Donate:FlattrLink]">[Text:Donate]: [Text:Flattr]</a>
</if>

as the second, and

<if placeholder="App:Donate:BitcoinAddress">
    <div title="[Text:Donate]: [Text:Bitcoin]">
        <span>[Text:Bitcoin]</span>
        <span>[App:Donate:BitcoinAddress]</span>
    </div>
</if>

Then, it remain this code:

    </aside>
</if>

This happend when App:Donate:HasDonationOptions is false.

dervishe- commented 9 years ago

Temporary workaround in the bootstrap theme (file app_details.tpl) avoiding the if cascade