Configuration & Layout architecture updates

Fixed production bug
Fixed styles
Updated Action Controller

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2012-01-13 23:36:03 +01:00
commit 66805034a6
815 changed files with 4020 additions and 1138 deletions

View file

@ -0,0 +1,28 @@
<div id="buildings" class="buildings item-list">
<h1><?php echo $this->__('Buildings')?></h1>
<?php echo $this->getPartial('item-list.items')->render()?>
<div class="clear"></div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
(function($){
jQuery(document).ready(function(){
var items = jQuery('#buildings .item');
jQuery('.image', items).hover(function(e){
jQuery('.details', jQuery(this).parent()).show();
}, function(e){
jQuery('.details', jQuery(this).parent()).hide();
});
jQuery('.buy', items).hover(function(e){
jQuery('.details', jQuery(this)).addClass('hover');
}, function(e){
jQuery('.details', jQuery(this)).removeClass('hover');
});
jQuery('.buy', items).click(function(e){
e.preventDefault();
document.location.href = jQuery('a', jQuery(this)).attr('href');
});
});
})(jQuery);
/*]]>*/
</script>

View file

@ -0,0 +1,30 @@
<?php /** @var Legacies_Core_Block_Template $this */?>
<div class="item-container">
<div class="item title">
<h2><a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a></h2>
<h3 class="level"><?php echo $this->__('Level %d', $this->renderNumber($this->getLevel()))?></h3>
</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="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->getNextLevel()))?></a></p>
</div>
<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 class="time"><?php echo $this->__('Building time: %s', $this->renderTime($this->getBuildingTimeForNextLevel(), true))?>
</div>
</div>
</div>

View file

@ -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?>

View file

@ -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>

View file

@ -0,0 +1,19 @@
<div class="shipyard item-list" id="reasearch-lab">
<h1><?php echo $this->__('Research Laboratory')?></h1>
<?php echo $this->getPartial('item-list.items')->render()?>
<div class="clear"></div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
(function($){
$(document).ready(function(){
var items = jQuery('#reasearch-lab .item');
jQuery('.image', items).hover(function(e){
jQuery('.details', jQuery(this).parent()).show();
}, function(e){
jQuery('.details', jQuery(this).parent()).hide();
});
});
})(jQuery);
/*]]>*/
</script>

View file

@ -0,0 +1,30 @@
<?php /** @var Legacies_Core_Block_Template $this */?>
<div class="item-container">
<div class="item title">
<h2><a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a></h2>
<h3 class="level"><?php echo $this->__('Level %d', $this->renderNumber($this->getLevel()))?></h3>
</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="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 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>
</div>

View file

@ -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?>

View file

@ -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>

View file

@ -0,0 +1,31 @@
<div class="shipyard item-list countable" id="shipyard">
<h1><?php echo $this->__('Shipyard')?></h1>
<form action="<?php echo $this->getUrl('buildings.php', array('mode' => 'fleet'))?>" method="post" id="shipyard-form">
<?php echo $this->getPartial('item-list.items')->render()?>
<input type="submit" value="<?php echo $this->__('Build')?>">
</form>
<div class="clear"></div>
<script type="text/javascript">
/*<![CDATA[*/
(function($){
$(document).ready(function(){
$('.shipyard .max a').click(function(){
var rel = this.rel.replace(/\:/, '\\\\:');
$('#' + rel).val($('#' + rel + '\\:max').val());
var hidden = $('#' + rel + '\\:max');
var input = $('#' + rel);
$('#shipyard-form').submit();
});
});
var items = jQuery('#shipyard .item');
$('.image', items).hover(function(e){
$('.details', $(this).parent()).show();
}, function(e){
$('.details', $(this).parent()).hide();
});
})(jQuery);
jQuery(document).ready(function(){
});
/*]]>*/
</script>
</div>

View file

@ -0,0 +1,34 @@
<?php /** @var Legacies_Core_Block_Template $this */?>
<div class="item-container">
<div class="item title">
<h2><a href="<?php echo $this->getItemInfoUrl()?>"><?php echo $this->escape($this->getName())?></a></h2>
<h3 class="count"><?php echo $this->__('Current count: %s', $this->renderNumber($this->getQty()))?></h3>
</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="qty">
<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())?>" />
</div>
<div class="max">
<p><a rel="ship:<?php echo $this->getItemId()?>"><?php echo $this->__('Build max (%s)', $this->renderNumber($this->getMaximumBuildableElementsCount()))?></a></p>
</div>
<div class="details">
<p><?php echo $this->getDescription()?></p>
<ul>
<?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>
</div>