front-end things

This commit is contained in:
Ferks-FK 2023-02-09 13:41:53 +00:00 committed by IceToast
parent f1a3126758
commit a9619be8d0
5 changed files with 194 additions and 29 deletions

View file

@ -0,0 +1,85 @@
<?php
namespace App\Http\Controllers\Admin\Settings;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class GeneralSettingsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
}
}

View file

@ -18,21 +18,18 @@ class SettingsController extends Controller
*/
public function index()
{
//Get all tabs as laravel view paths
$tabs = [];
if(file_exists(Theme::getViewPaths()[0] . '/admin/settings/tabs/')){
$tabspath = glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php');
}else{
$tabspath = glob(Theme::path($path = 'views', $themeName = 'default').'/admin/settings/tabs/*.blade.php');
$tabspath = glob(Theme::path('views', 'default').'/admin/settings/tabs/*.blade.php');
}
foreach ($tabspath as $filename) {
foreach ($tabspath as $filename) {
$tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php');
}
//Generate a html list item for each tab based on tabs file basename, set first tab as active
$tabListItems = [];
foreach ($tabs as $tab) {

View file

@ -0,0 +1,4 @@
@extends('admin.settings.layout')
@section('settings_content')
@endsection

View file

@ -10,7 +10,7 @@
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a href="">{{ __('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{ route('admin.settings.index') }}">{{ __('Settings') }}</a></li>
</ol>
@ -31,34 +31,100 @@
<section class="content">
<div class="container-fluid">
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fa-tools mr-2"></i>{{ __('Settings') }}</h5>
</div>
</div>
<div class="card-body ">
<!-- Nav pills -->
<ul class="nav nav-tabs">
@foreach ($tabListItems as $tabListItem)
{!! $tabListItem !!}
@endforeach
</ul>
<!-- Tab panes -->
<div class="tab-content">
@foreach ($tabs as $tab)
@include($tab)
@endforeach
</div>
</form>
<div class="card-body">
<aside class="d-flex" style="">
<div class="sidebar d-flex flex-column" style="height: fit-content">
<nav class="container">
<ul class="row nav nav-pills nav-sidebar flex-column" style="width: fit-content" data-widget="treeview" role="menu" data-accordion="false">
<li class="nav-item col">
<a href="#general"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('General') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#system"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('System') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#mail"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Mail') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#discord"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Discord') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#invoices"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Invoices') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#locales"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Locales') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#pterodactyl"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Pterodactyl') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#referral"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Referral') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#servers"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Servers') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#tickets"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Tickets') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#users"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Users') }}</p>
</a>
</li>
<li class="nav-item col">
<a href="#website"
class="nav-link @if (Request::routeIs('home')) active @endif">
<p>{{ __('Website') }}</p>
</a>
</li>
</ul>
</nav>
</div>
<div class="d-flex justify-content-around w-100">
<div class="d-flex" style="height: fit-content;">
Ptero API
</div>
<div class="d-flex" style="height: fit-content;">
<input type="text" name="text" id="#general">
</div>
</div>
</aside>
</div>
</div>

View file

@ -0,0 +1,13 @@
@extends('layouts.main')
@section('content')
<div class="main py-4">
<div class="bg-white rounded shadow p-4 my-4">
<ul class="list-inline list-group-flush list-group-borderless mb-0">
SETTING
</ul>
</div>
<div class="card card-body border-0 shadow table-wrapper table-responsive">
@yield('settings_content')
</div>
</div>
@endsection