Travel Guide Frontend Backend
This commit is contained in:
parent
e6cc042aee
commit
0857a34766
681 changed files with 6680 additions and 1689 deletions
|
|
@ -91,10 +91,18 @@ class ContentModalController extends Controller
|
|||
case 'tree-site-content' :
|
||||
return $this->actionTreeSiteContent($data);
|
||||
break;
|
||||
case 'add-answer-question' :
|
||||
return $this->actionAddAnswerQuestion($data);
|
||||
break;
|
||||
|
||||
case 'guide-tree-site' :
|
||||
return $this->actionGuideTreeSite($data);
|
||||
break;
|
||||
case 'site-travel-identifier' :
|
||||
return $this->actionSiteTravelIdentifier($data);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -172,7 +180,7 @@ class ContentModalController extends Controller
|
|||
*/
|
||||
private function actionArea($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
if($data['id'] === "add"){
|
||||
$value = new IQContentArea();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
|
|
@ -189,7 +197,7 @@ class ContentModalController extends Controller
|
|||
private function actionAreaSection($data)
|
||||
{
|
||||
$model = IQContentArea::findOrFail($data['request']['area_id']);
|
||||
if($data['id'] == "add"){
|
||||
if($data['id'] === "add"){
|
||||
$value = new IQContentAreaSection();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
|
|
@ -209,7 +217,7 @@ class ContentModalController extends Controller
|
|||
*/
|
||||
private function actionSiteContent($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
if($data['id'] === "add"){
|
||||
$value = new IQContentSite();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
|
|
@ -228,7 +236,7 @@ class ContentModalController extends Controller
|
|||
*/
|
||||
private function actionTreeContent($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
if($data['id'] === "add"){
|
||||
$value = new IQContentTree();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
|
|
@ -245,7 +253,7 @@ class ContentModalController extends Controller
|
|||
{
|
||||
$model = IQContentTree::findOrFail($data['request']['tree_id']);
|
||||
|
||||
if($data['id'] == "add"){
|
||||
if($data['id'] === "add"){
|
||||
$value = new IQContentTreeNode();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
|
|
@ -261,15 +269,15 @@ class ContentModalController extends Controller
|
|||
|
||||
private function actionTreeSiteContent($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
if($data['id'] === "add"){
|
||||
$value = new Collection();
|
||||
$value->active = true;
|
||||
$value->id = 'add';
|
||||
$data['title'] = "Seite hinzufügen";
|
||||
|
||||
}else {
|
||||
$value = new Collection();
|
||||
$data['title'] = "Edit Site: ".$value->name;
|
||||
/* $value = new Collection();
|
||||
$data['title'] = "Edit Site: ".$value->name;*/
|
||||
}
|
||||
|
||||
$url = route('iq_content_tree_detail', [$data['request']['tree_id'], $data['request']['tree_node_id']]);
|
||||
|
|
@ -278,6 +286,25 @@ class ContentModalController extends Controller
|
|||
return view("iq.modal.site", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
private function actionAddAnswerQuestion($data)
|
||||
{
|
||||
if($data['id'] === "add"){
|
||||
$value = new Collection();
|
||||
$value->active = true;
|
||||
$value->id = 'add';
|
||||
$data['title'] = "Frage & Antwort hinzufügen";
|
||||
|
||||
}else {
|
||||
/* $value = new Collection();
|
||||
$data['title'] = "Edit Eintrag: ".$value->name; */
|
||||
}
|
||||
|
||||
$url = route('iq_content_tree_detail', [$data['request']['tree_id'], $data['request']['tree_node_id']]);
|
||||
|
||||
$data['request'] = false;
|
||||
return view("iq.modal.faq", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
private function actionGuideTreeSite($data)
|
||||
{
|
||||
if(!isset($data['tree_id'])){
|
||||
|
|
@ -287,8 +314,6 @@ class ContentModalController extends Controller
|
|||
$data['travel_guide_id'] = $data['request']['travel_guide_id'];
|
||||
$data['title'] = "Tree zuordnen";
|
||||
$url = route('cms_travel_guide_detail', [$data['request']['travel_guide_id']]);
|
||||
|
||||
|
||||
}else {
|
||||
$value = new Collection();
|
||||
$value->active = true;
|
||||
|
|
@ -300,16 +325,35 @@ class ContentModalController extends Controller
|
|||
|
||||
}
|
||||
$url = route('iq_content_tree_detail', [$data['tree_id']]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$data['request'] = false;
|
||||
return view("iq.modal.tree_site", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
private function actionSiteTravelIdentifier($data)
|
||||
{
|
||||
$value = IQContentSite::find($data['id']);
|
||||
|
||||
$node = $value->iq_content_tree_node;
|
||||
|
||||
$select_data = \App\Models\IQContentSite::$travelTypes;
|
||||
|
||||
foreach ($node->iq_content_sites as $site){
|
||||
if($site->identifier !== null && $site->identifier !== ''){
|
||||
if(isset($select_data[$site->identifier])) {
|
||||
unset($select_data[$site->identifier]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$data['title'] = " Zuordnung Seite";
|
||||
$url = route('iq_content_tree_detail', [$data['request']['tree_id'], $data['request']['tree_node_id']]);
|
||||
$data['request'] = false;
|
||||
return view("iq.modal.travel-identifier", compact('data','value', 'url', 'select_data') )->render();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue