mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Admin-ui support for fields as links. eg. readParms='link=field_url'
This commit is contained in:
parent
a01e9933e4
commit
45ac119d83
@ -69,7 +69,7 @@ class links_admin_ui extends e_admin_ui
|
||||
protected $batchDelete = true;
|
||||
protected $batchCopy = true;
|
||||
protected $listOrder = 'link_category,link_order ASC';
|
||||
protected $listSorting = true; // TODO - should enable the 'sort' icon in the 'options' column.
|
||||
protected $listSorting = true;
|
||||
|
||||
|
||||
public $current_parent = 0;
|
||||
@ -78,7 +78,7 @@ class links_admin_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'width' => '3%','forced' => true, 'thclass' => 'center first','class' => 'center first'),
|
||||
'link_button' => array('title'=> LAN_ICON, 'type'=>'icon', 'width'=>'5%', 'thclass' => 'center', 'class'=>'center'),
|
||||
'link_id' => array('title'=> LAN_ID, 'noedit'=>TRUE),
|
||||
'link_id' => array('title'=> LAN_ID, 'type'=>'text','readParms'=>'link=link_url&target=dialog','noedit'=>TRUE),
|
||||
'link_name' => array('title'=> LCLAN_15, 'width'=>'auto','type'=>'text', 'inline'=>true, 'required' => true, 'validate' => true),
|
||||
'link_category' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto'),
|
||||
|
||||
|
@ -2172,12 +2172,17 @@ class e_form
|
||||
$ext = vartrue($parms['target']) =='blank' ? " rel='external' " : ""; // new window
|
||||
$modal = vartrue($parms['target']) =='modal' ? " data-toggle='modal' data-cache='false' data-target='#uiModal' " : "";
|
||||
|
||||
$data = $this->getController()->getListModel()->toArray();
|
||||
if($parms['link'] == 'sef') //XXX @Miro - Thoughts?
|
||||
{
|
||||
$data = $this->getController()->getListModel()->toArray();
|
||||
{
|
||||
$urlData = $this->getController()->getUrl();
|
||||
$link = e107::getUrl()->create($urlData['profile'], $data);
|
||||
}
|
||||
elseif(vartrue($data[$parms['link']])) // support for a field-name as the link. eg. link_url.
|
||||
{
|
||||
$link = $tp->replaceConstants(vartrue($data[$parms['link']]));
|
||||
}
|
||||
|
||||
|
||||
$value = "<a class='e-tip{$dialog}' {$ext} href='".$link."' {$modal} title='Quick View'>".$value."</a>";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user