Added latest changes to repo (from older debug session)
This commit is contained in:
parent
2bdf581ba1
commit
e112b8ee6c
@ -36,4 +36,16 @@ jQuery(function($){
|
|||||||
$('a.clubs-save', this).click();
|
$('a.clubs-save', this).click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#clubs_add_place').click(function(ev){
|
||||||
|
ev.preventDefault();
|
||||||
|
|
||||||
|
var last = $('.clubs_place:last');
|
||||||
|
var newElement = last.clone();
|
||||||
|
$('*', newElement).remove();
|
||||||
|
newElement.insertAfter(last);
|
||||||
|
|
||||||
|
$.get('index.php?option=com_clubs&view=part&mode=edit&type=club.place&id=new', function(data){
|
||||||
|
newElement.html(data);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -19,7 +19,9 @@ class ClubsPartClubPlace extends ClubsHelperParts
|
|||||||
protected function getEditMarkup()
|
protected function getEditMarkup()
|
||||||
{
|
{
|
||||||
$factory = new CommonClubsModelFactoryPlace();
|
$factory = new CommonClubsModelFactoryPlace();
|
||||||
$place = $factory->loadById($this->id);
|
$place = $factory->loadById($this->id, false);
|
||||||
|
if($place === null)
|
||||||
|
$place = $factory->createNew();
|
||||||
|
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
ob_clean();
|
ob_clean();
|
||||||
|
@ -105,20 +105,17 @@ $clubid = $this->club->getId();
|
|||||||
|
|
||||||
<div class='clubs_row'>
|
<div class='clubs_row'>
|
||||||
<div class='clubs_title_row'>Räumlichkeiten</div>
|
<div class='clubs_title_row'>Räumlichkeiten</div>
|
||||||
<?php if(count($this->club->getPlaces()) > 0): ?>
|
|
||||||
<?php
|
<?php
|
||||||
foreach($this->club->getPlaces() as $p)
|
foreach($this->club->getPlaces() as $p)
|
||||||
{
|
{
|
||||||
$partHandler = new ClubsPartClubPlace($p->getId());
|
$partHandler = new ClubsPartClubPlace($p->getId());
|
||||||
echo "<div class='clubs_content_row'>";
|
echo "<div class='clubs_content_row clubs_place'>";
|
||||||
echo $partHandler->getViewPart();
|
echo $partHandler->getViewPart();
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php else: ?>
|
|
||||||
<div class='message-empty <?php echo count($this->club->getPlaces()) == 0 ? '' : 'clubs-hidden'; ?>'>Der Verein hat keine Angebote festgelegt.</div>
|
<div class='message-empty <?php echo count($this->club->getPlaces()) == 0 ? '' : 'clubs-hidden'; ?>'>Der Verein hat keine Angebote festgelegt.</div>
|
||||||
<?php endif; ?>
|
<div class='clubs_content_row'><a id='clubs_add_place' href='<?php echo ""; ?>'><span class='icon-new'></span> Neue Assoziation anlegen</a></div>
|
||||||
<div class='clubs_content_row'><a href='<?php echo ""; ?>'><span class='icon-new'></span> Neue Assoziation anlegen</a></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='clubs_row'>
|
<div class='clubs_row'>
|
||||||
|
Loading…
Reference in New Issue
Block a user