| Summary: | Template indentation | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Paul Poulain <paul.poulain> |
| Component: | Architecture, internals, and plumbing | Assignee: | natasha <tasham_8> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | hayleypelham, tasham_8 |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 7119 | ||
| Attachments: | Screenshot of code | ||
Created attachment 47050 [details]
Screenshot of code
This looks like it has already been fixed.
This appears to be fixed. Changing status to Resolved. |
The template indentation make it very hard to read. For example, in circulation.tt: [% IF ( MARCURLS ) %] <div class="results_summary"><span class="label">Online Resources:</span> <ul> [% FOREACH MARCurl IN MARCURLS %] <li>[% IF ( MARCurl.part ) %][% MARCurl.part %] <br />[% END %] <!-- here you might do a tmpl_if name="toc" and use greybox or equivalent for table of contents --> [% IF ( MARCurl.OPACurlOpenInNewWindow ) %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">[% ELSE %]<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% END %] [% MARCurl.linktext %]</a> [% IF ( MARCurl.notes ) %]<ul>[% FOREACH note IN MARCurl.notes %]<li>[% note.note %]</li>[% END %]</ul>[% END %]</li> [% END %]</ul> </div> [% END %] The last end, that is aligned with the first [IF] don't close this if... During kohacon11 hackfest, we tried to investigate how to indent templates. We haven't found THE solution, but here are a few links (thanks mason) : http://www.perlmonks.org/?node_id=887632 http://wiki.dandascalescu.com/howtos/indenting_tt_and_html