|
1 | 1 | {% macro sponsors(sponsors, type) %} |
2 | | - {% if type == 4 %} |
| 2 | + {% if type == 4 and sponsors|length > 0 %} |
3 | 3 | <div class="center"> |
4 | 4 | <ul class="list_sponsors"> |
5 | 5 | <h2 class="text">General sponsors</h2> |
|
14 | 14 | {% endfor %} |
15 | 15 | </ul> |
16 | 16 | </div> |
17 | | - {% elseif type == 2 %} |
| 17 | + {% elseif type == 2 and sponsors|length > 0 %} |
18 | 18 | <div class="center"> |
19 | 19 | <ul class="list_sponsors gold"> |
20 | 20 | <h3 class="text">Gold sponsors</h3> |
|
29 | 29 | {% endfor %} |
30 | 30 | </ul> |
31 | 31 | </div> |
32 | | - {% elseif type == 3 %} |
| 32 | + {% elseif type == 3 and sponsors|length > 0 %} |
33 | 33 | <div class="center"> |
34 | 34 | <ul class="list_sponsors middle"> |
35 | 35 | <h4 class="text">Silver sponsors</h4> |
|
44 | 44 | {% endfor %} |
45 | 45 | </ul> |
46 | 46 | </div> |
47 | | - {% else %} |
| 47 | + {% elseif type == 5 and sponsors|length > 0 %} |
48 | 48 | <div class="center"> |
49 | 49 | <ul class="list_sponsors middle"> |
50 | 50 | <h4 class="text">Info Partners</h4> |
|
70 | 70 | {% set generalType = constant('Event\\EventBundle\\Entity\\Sponsor::TYPE_GENERAL') %} |
71 | 71 | {% set goldType = constant('Event\\EventBundle\\Entity\\Sponsor::TYPE_GOLD') %} |
72 | 72 | {% set silverType = constant('Event\\EventBundle\\Entity\\Sponsor::TYPE_SILVER') %} |
| 73 | + {% set infoType = constant('Event\\EventBundle\\Entity\\Sponsor::TYPE_INFO') %} |
73 | 74 |
|
74 | 75 | {% if event.sponsors|length > 0 and event.getSponsorsExclude|length > 0 %} |
75 | 76 | {{ _self.sponsors(event.getSpecifiedSponsors(generalType), generalType) }} |
76 | 77 | {{ _self.sponsors(event.getSpecifiedSponsors(goldType), goldType) }} |
77 | 78 | {{ _self.sponsors(event.getSpecifiedSponsors(silverType), silverType) }} |
| 79 | + {{ _self.sponsors(event.getSpecifiedSponsors(infoType), infoType) }} |
78 | 80 | {% endif %} |
79 | 81 |
|
80 | 82 | {% if event.specifiedSponsors()|length > 0 %} |
|
0 commit comments