Updated themes
Updated buildings Updated shipyard page (ships & defense) Added Buildings building queue display & cancel build action. Added research lab Added navigation block structure Removed old code Updated registration Added files to .gitignore Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
ddfb36efa5
commit
8f0f7a4d46
147 changed files with 3488 additions and 2468 deletions
|
|
@ -1,20 +1,4 @@
|
|||
<div class="shipyard">
|
||||
<div class="buildings item-list">
|
||||
<h1><?php echo $this->__('Buildings')?></h1>
|
||||
<form action="<?php echo $this->getUrl('buildings.php')?>" method="post">
|
||||
<dl>
|
||||
<?php echo $this->getPartial('item-list.items')->render()?>
|
||||
</dl>
|
||||
<input type="submit" value="<?php echo $this->__('Build')?>">
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
/*<![CDATA[*/
|
||||
(function($){
|
||||
$(document).ready(function(){
|
||||
$('.shipyard .buy .max').click(function(){
|
||||
$('#' + this.rel).val($('#' + this.rel + ':max').val());
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
/*]]>*/
|
||||
</script>
|
||||
<?php echo $this->getPartial('item-list.items')->render()?>
|
||||
</div>
|
||||
|
|
@ -1,18 +1,27 @@
|
|||
<?php /** @var Legacies_Core_Block_Template $this */?>
|
||||
<dt>
|
||||
<div class="item title">
|
||||
<h2><a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a> (<?php echo $this->renderNumber($this->getLevel())?>)</h2>
|
||||
</dt>
|
||||
<dd>
|
||||
</div>
|
||||
<div class="item details">
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>" class="image"><img src="<?php echo $this->getItemImageUrl()?>" alt="" width="120" height="120" /></a>
|
||||
<div class="details">
|
||||
<p><?php echo $this->getDescription()?></p>
|
||||
<ul>
|
||||
<?php foreach ($this->getResourcesNeeded() as $resourceId => $resourceValue):?>
|
||||
<li><span class="resource"><?php echo $this->getResourceName($resourceId)?></span><span class="cost"><?php echo $this->renderNumber($resourceValue)?></span></li>
|
||||
<?php foreach ($this->getResourcesConfigForNextLevel() as $resourceId => $resourceConfig):?>
|
||||
<li class="resource">
|
||||
<span class="label"><?php echo $this->getResourceName($resourceId)?></span>
|
||||
<span class="cost<?php if ($resourceConfig->hasData('requirement')):?> capped<?php endif?>"><?php echo $this->renderNumber($resourceConfig->getData('value'))?></span>
|
||||
<?php if ($resourceConfig->hasData('requirement')):?>
|
||||
<span class="requirement">(<?php echo $this->renderNumber($resourceConfig->getData('requirement'))?>)</span>
|
||||
<?php else:?>
|
||||
<span class="overflow">(<?php echo $this->renderNumber($resourceConfig->getData('overflow'))?>)</span>
|
||||
<?php endif?>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<p><?php echo $this->__('Building time: %s', $this->renderTime($this->getBuildingTimeForNextLevel(), true))?>
|
||||
</div>
|
||||
<div class="buy">
|
||||
<p><a class="build" href="<?php echo $this->getUrl('buildings.php', array('building' => $this->getItemId()))?>"><?php echo $this->__('Build next level (%s)', $this->renderNumber($this->getLevel() + 1))?></a></p>
|
||||
<p><a class="build" href="<?php echo $this->getUrl('buildings.php', array('building' => $this->getItemId()))?>"><?php echo $this->__('Build next level (%s)', $this->renderNumber($this->getNextLevel()))?></a></p>
|
||||
</div>
|
||||
</dd>
|
||||
</div>
|
||||
|
|
@ -1 +1,6 @@
|
|||
<?php
|
||||
<?php if (!$this->isEmpty()):?>
|
||||
<div class="building queue">
|
||||
<h1><?php echo $this->__('Work in progress')?></h1>
|
||||
<?php echo $this->getPartial('item-list')->render() ?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php /** @var Legacies_Core_Block_Template $this */?>
|
||||
<div class="item queue">
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>" class="image"><img src="<?php echo $this->getItemImageUrl()?>" alt="" width="30" height="30" /></a>
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a> (<?php echo $this->renderNumber($this->getItemQueuedLevel())?>)
|
||||
<div class="cancel">
|
||||
<p><a class="build" href="<?php echo $this->getUrl('buildings.php', array('cancel' => $this->getItem()->getIndex()))?>"><?php echo $this->__('Cancel')?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<div class="shipyard item-list">
|
||||
<h1><?php echo $this->__('Research Laboratory')?></h1>
|
||||
<?php echo $this->getPartial('item-list.items')->render()?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?php /** @var Legacies_Core_Block_Template $this */?>
|
||||
<div class="item title">
|
||||
<h2><a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a> (<?php echo $this->renderNumber($this->getLevel())?>)</h2>
|
||||
</div>
|
||||
<div class="item details">
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>" class="image"><img src="<?php echo $this->getItemImageUrl()?>" alt="" width="120" height="120" /></a>
|
||||
<div class="details">
|
||||
<p><?php echo $this->getDescription()?></p>
|
||||
<ul>
|
||||
<?php foreach ($this->getResourcesConfigForNextLevel() as $resourceId => $resourceConfig):?>
|
||||
<li class="resource">
|
||||
<span class="label"><?php echo $this->getResourceName($resourceId)?></span>
|
||||
<span class="cost<?php if ($resourceConfig->hasData('requirement')):?> capped<?php endif?>"><?php echo $this->renderNumber($resourceConfig->getData('value'))?></span>
|
||||
<?php if ($resourceConfig->hasData('requirement')):?>
|
||||
<span class="requirement">(<?php echo $this->renderNumber($resourceConfig->getData('requirement'))?>)</span>
|
||||
<?php else:?>
|
||||
<span class="overflow">(<?php echo $this->renderNumber($resourceConfig->getData('overflow'))?>)</span>
|
||||
<?php endif?>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<p><?php echo $this->__('Building time: %s', $this->renderTime($this->getBuildingTime(1), false))?>
|
||||
</div>
|
||||
<div class="buy">
|
||||
<p><a class="build" href="<?php echo $this->getUrl('buildings.php', array('building' => $this->getItemId(), 'mode' => 'research'))?>"><?php echo $this->__('Build next level (%s)', $this->renderNumber($this->getNextLevel()))?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?php if (!$this->isEmpty()):?>
|
||||
<div class="building queue">
|
||||
<h1><?php echo $this->__('Work in progress')?></h1>
|
||||
<?php echo $this->getPartial('item-list')->render() ?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php /** @var Legacies_Core_Block_Template $this */?>
|
||||
<div class="item queue">
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>" class="image"><img src="<?php echo $this->getItemImageUrl()?>" alt="" width="30" height="30" /></a>
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a> (<?php echo $this->renderNumber($this->getItemQueuedLevel())?>)
|
||||
<div class="cancel">
|
||||
<p><a class="build" href="<?php echo $this->getUrl('buildings.php', array('cancel' => $this->getItem()->getIndex()))?>"><?php echo $this->__('Cancel')?></a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="shipyard">
|
||||
<div class="shipyard item-list">
|
||||
<h1><?php echo $this->__('Shipyard')?></h1>
|
||||
<form action="<?php echo $this->getUrl('buildings.php', array('mode' => 'fleets'))?>" method="post">
|
||||
<dl>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,29 @@
|
|||
<?php /** @var Legacies_Core_Block_Template $this */?>
|
||||
<dt>
|
||||
<div class="item title">
|
||||
<h2><a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a> (<?php echo $this->renderNumber($this->getQty())?>)</h2>
|
||||
</dt>
|
||||
<dd>
|
||||
</div>
|
||||
<div class="item details">
|
||||
<a href="<?php echo $this->getItemInfoUrl()?>" class="image"><img src="<?php echo $this->getItemImageUrl()?>" alt="" width="120" height="120" /></a>
|
||||
<div class="details">
|
||||
<p><?php echo $this->getDescription()?></p>
|
||||
<ul>
|
||||
<?php foreach ($this->getResourcesNeeded() as $resourceId => $resourceValue):?>
|
||||
<li><span class="resource"><?php echo $this->getResourceName($resourceId)?></span><span class="cost"><?php echo $this->renderNumber($resourceValue)?></span></li>
|
||||
<?php foreach ($this->getResourcesConfigForQty(1) as $resourceId => $resourceConfig):?>
|
||||
<li class="resource">
|
||||
<span class="label"><?php echo $this->getResourceName($resourceId)?></span>
|
||||
<span class="cost<?php if ($resourceConfig->hasData('requirement')):?> capped<?php endif?>"><?php echo $this->renderNumber($resourceConfig->getData('value'))?></span>
|
||||
<?php if ($resourceConfig->hasData('requirement')):?>
|
||||
<span class="requirement">(<?php echo $this->renderNumber($resourceConfig->getData('requirement'))?>)</span>
|
||||
<?php else:?>
|
||||
<span class="overflow">(<?php echo $this->renderNumber($resourceConfig->getData('overflow'))?>)</span>
|
||||
<?php endif?>
|
||||
</li>
|
||||
<?php endforeach?>
|
||||
</ul>
|
||||
<p><?php echo $this->__('Building time: %s', $this->renderTime($this->getBuildingTime(1), false))?>
|
||||
</div>
|
||||
<div class="buy">
|
||||
<p><input type="text" name="ship[<?php echo $this->getItemId()?>]" id="ship:<?php echo $this->getItemId()?>" /></p>
|
||||
<input type="hidden" id="ship:<?php echo $this->getItemId()?>:max" value="<?php echo $this->escape($this->getMaximumBuildableElementsCount())?>" />
|
||||
<p><a class="max" rel="ship:<?php echo $this->getItemId()?>"><?php echo $this->__('Max (%s)', $this->renderNumber($this->getMaximumBuildableElementsCount()))?></a></p>
|
||||
</div>
|
||||
</dd>
|
||||
</div>
|
||||
Loading…
Reference in a new issue