| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- /**
- * Building view.
- *
- * Contains the view layout and some code to present the data
- *
- * @author Iñigo Valentin <i@inigovalentin.com>
- * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
- * @package SWDB
- * @category View
- * @property Building_Page $page The page model,.
- * @var Building_Page $page The page model,.
- */
- ?>
- <!DOCTYPE html>
- <html lang='en'>
- <head>
- <?=$page->generate_head()?>
- </head>
- <body>
- <header>
- <?php
- include __DIR__ . "/inc/header_app.php";
- ?>
- </header>
- <aside id='filters' class='content filters'>
- <h2 id='filters_title'>
- <?=$page->get_building()->get_name()?>
- </h2>
- <p>
- <?=HTML::building_panel($page->get_building())?>
- <?=$page->get_building()->get_description()?>
- </p>
- </aside>
- <main>
- <?php
- if ($page->is_decorative()){
- ?>
- <section class='content'>
- <h2>
- Levels
- </h2>
- <article>
- <table id='levels'>
- <tr>
- <th>
- Level
- </th>
- <th>
- Bonus
- </th>
- <th>
- Cost
- </th>
- <tr>
- <?php
- $bonus = $page->get_building()->get_level_bonus();
- $cost = $page->get_building()->get_level_cost();
- for ($i = 1; $i <= min([sizeof($bonus), sizeof($cost)]); $i ++){
- ?>
- <tr class='<?=($i % 2 == 0 ? "even" : "odd")?>'>
- <td>
- <?=$i?>
- </td>
- <td>
- <?=$bonus[$i]?>
- </td>
- <td>
- <?=$cost[$i]?>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </article>
- </section>
- <?php
- }
- ?>
- </main>
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|