Club frontend partly created, missing the special cases
This commit is contained in:
@@ -11,6 +11,16 @@ abstract class ClubsHelperParts
|
||||
*/
|
||||
abstract protected function getPartName();
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
public function __construct($id = null)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -18,11 +28,16 @@ abstract class ClubsHelperParts
|
||||
{
|
||||
$partname = $this->getPartName();
|
||||
|
||||
$ret = "<form method='POST' action='index.php?option=com_clubs&task=parts.edit&format=json' class='clubs-part'>";
|
||||
$ret = "<form method='POST' action='index.php?option=com_clubs&task=parts.edit&format=json' class='clubs-part'>";
|
||||
$ret .= "<input type='hidden' name='partname' value='$partname'>";
|
||||
if(isset($this->id))
|
||||
$ret .= "<input type='hidden' name='id' value='{$this->id}'>";
|
||||
$ret .= $this->getEditMarkup();
|
||||
$ret .= ' <a class="clubs-save" href="#"><span class="icon-ok"></span></a> ';
|
||||
$ret .= '<a class="clubs-abort" href="index.php?option=com_clubs&view=part&type='.$partname.'"><span class="icon-cancel-2"></span></a>';
|
||||
$idPart = '';
|
||||
if(isset($this->id))
|
||||
$idPart = "&id=" . $this->id;
|
||||
$ret .= '<a class="clubs-abort" href="index.php?option=com_clubs&view=part&type='.$partname.$idPart.'"><span class="icon-cancel-2"></span></a>';
|
||||
$ret .= '</form>';
|
||||
|
||||
return $ret;
|
||||
@@ -54,12 +69,19 @@ abstract class ClubsHelperParts
|
||||
*/
|
||||
public function getViewPart()
|
||||
{
|
||||
$ret = '';
|
||||
$idPart = '';
|
||||
if(isset($this->id))
|
||||
$idPart = "&id={$this->id}";
|
||||
|
||||
$ret = "<a class='clubs-edit' href='index.php?option=com_clubs&view=part&mode=edit&type=" . $this->getPartName(). "'>";
|
||||
$ret = "<a class='clubs-edit' href='index.php?option=com_clubs&view=part&mode=edit&type=" . $this->getPartName(). "$idPart'>";
|
||||
$ret .= $this->getViewContent();
|
||||
$ret .= "<span class='icon-apply clubs-hidden edit-icon' style='font-size: 200%; margin-left: 0.75em;'></span></a>";
|
||||
$ret .= "<span class='icon-apply clubs-hidden edit-icon' style='font-size: {$this->getEditSymbolSize()}; margin-left: 0.75em; margin-right: 0.4em; '></span></a>";
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
protected function getEditSymbolSize()
|
||||
{
|
||||
return '120%';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user