buildings.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * Building list view.
  4. *
  5. * Contains the view layout and some code to present the data
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package SWDB
  10. * @category View
  11. * @property Buildings_Page $page The page model,.
  12. * @var Buildings_Page $page The page model,.
  13. */
  14. ?>
  15. <!DOCTYPE html>
  16. <html lang='en'>
  17. <head>
  18. <?=$page->generate_head()?>
  19. </head>
  20. <body>
  21. <header>
  22. <?php
  23. include __DIR__ . "/inc/header_app.php";
  24. ?>
  25. </header>
  26. <aside id='filters' class='content filters'>
  27. <h2 id='filters_title'>
  28. Buildings
  29. </h2>
  30. <p>
  31. A list with every building in the game.
  32. </p>
  33. </aside>
  34. <main>
  35. <section id='list' class='list'>
  36. <h2>
  37. Buildings
  38. </h2>
  39. <article>
  40. <?php
  41. foreach ($page->get_buildables() as $buildable){
  42. ?>
  43. <a href='/buildings/<?=$buildable->get_id()?>'>
  44. <?=HTML::building_panel($buildable)?>
  45. </a>
  46. <?php
  47. }
  48. ?>
  49. </article>
  50. </section>
  51. <section id='list' class='list'>
  52. <h2>
  53. Decorations
  54. </h2>
  55. <article>
  56. <?php
  57. foreach ($page->get_decoratives() as $decorative){
  58. ?>
  59. <a href='/buildings/<?=$decorative->get_id()?>'>
  60. <?=HTML::building_panel($decorative)?>
  61. </a>
  62. <?php
  63. }
  64. ?>
  65. </article>
  66. </section>
  67. <section id='list' class='list'>
  68. <h2>
  69. Guild Flags
  70. </h2>
  71. <article>
  72. <?php
  73. foreach ($page->get_flags() as $flag){
  74. ?>
  75. <a href='/buildings/<?=$flag->get_id()?>'>
  76. <?=HTML::building_panel($flag)?>
  77. </a>
  78. <?php
  79. }
  80. ?>
  81. </article>
  82. </section>
  83. </main>
  84. <?php
  85. include __DIR__ . "/inc/footer.php";
  86. ?>
  87. </body>
  88. </html>