Kaydet (Commit) c7d97632 authored tarafından Baran Sekin's avatar Baran Sekin

Applied pretty code formatting to views

üst 5d453986
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
......@@ -14,6 +13,6 @@ return [
*/
'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
'throttle' =>
'Too many login attempts. Please try again in :seconds seconds.',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
......@@ -15,5 +14,4 @@ return [
'previous' => '&laquo; Previous',
'next' => 'Next &raquo;',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
......@@ -17,5 +16,4 @@ return [
'sent' => 'We have e-mailed your password reset link!',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.",
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
......@@ -16,13 +15,16 @@ return [
'accepted' => 'The :attribute must be accepted.',
'active_url' => 'The :attribute is not a valid URL.',
'after' => 'The :attribute must be a date after :date.',
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
'after_or_equal' =>
'The :attribute must be a date after or equal to :date.',
'alpha' => 'The :attribute may only contain letters.',
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
'alpha_dash' =>
'The :attribute may only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute may only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'before_or_equal' =>
'The :attribute must be a date before or equal to :date.',
'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
'file' => 'The :attribute must be between :min and :max kilobytes.',
......@@ -52,8 +54,10 @@ return [
],
'gte' => [
'numeric' => 'The :attribute must be greater than or equal :value.',
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
'string' => 'The :attribute must be greater than or equal :value characters.',
'file' =>
'The :attribute must be greater than or equal :value kilobytes.',
'string' =>
'The :attribute must be greater than or equal :value characters.',
'array' => 'The :attribute must have :value items or more.',
],
'image' => 'The :attribute must be an image.',
......@@ -73,7 +77,8 @@ return [
'lte' => [
'numeric' => 'The :attribute must be less than or equal :value.',
'file' => 'The :attribute must be less than or equal :value kilobytes.',
'string' => 'The :attribute must be less than or equal :value characters.',
'string' =>
'The :attribute must be less than or equal :value characters.',
'array' => 'The :attribute must not have more than :value items.',
],
'max' => [
......@@ -98,11 +103,16 @@ return [
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
'required_unless' =>
'The :attribute field is required unless :other is in :values.',
'required_with' =>
'The :attribute field is required when :values is present.',
'required_with_all' =>
'The :attribute field is required when :values are present.',
'required_without' =>
'The :attribute field is required when :values is not present.',
'required_without_all' =>
'The :attribute field is required when none of :values are present.',
'same' => 'The :attribute and :other must match.',
'size' => [
'numeric' => 'The :attribute must be :size.',
......@@ -110,7 +120,8 @@ return [
'string' => 'The :attribute must be :size characters.',
'array' => 'The :attribute must contain :size items.',
],
'starts_with' => 'The :attribute must start with one of the following: :values',
'starts_with' =>
'The :attribute must start with one of the following: :values',
'string' => 'The :attribute must be a string.',
'timezone' => 'The :attribute must be a valid zone.',
'unique' => 'The :attribute has already been taken.',
......@@ -147,5 +158,4 @@ return [
*/
'attributes' => [],
];
......@@ -12,6 +12,8 @@ return [
|
*/
'failed' => 'Girilmiş olan kullanıcı verileri sistemdekiler ile eşleşmemektedir.',
'throttle' => 'Çok fazla oturum açma girişiminde bulundunuz. Lütfen :seconds saniye içerisinde tekrar deneyiz.',
'failed' =>
'Girilmiş olan kullanıcı verileri sistemdekiler ile eşleşmemektedir.',
'throttle' =>
'Çok fazla oturum açma girişiminde bulundunuz. Lütfen :seconds saniye içerisinde tekrar deneyiz.',
];
......@@ -11,7 +11,8 @@ return [
|
*/
'password' => 'Parolanız en az sekiz karakter olmalı ve doğrulama ile eşleşmelidir.',
'password' =>
'Parolanız en az sekiz karakter olmalı ve doğrulama ile eşleşmelidir.',
'reset' => 'Parolanız sıfırlandı!',
'sent' => 'Parola sıfırlama bağlantınız e-posta ile gönderildi!',
'token' => 'Parola sıfırlama adresi/kodu geçersiz.',
......
<?php
return [
/*
|--------------------------------------------------------------------------
| Doğrulama mesajları
......@@ -15,17 +14,22 @@ return [
'accepted' => ':attribute kabul edilmelidir.',
'active_url' => ':attribute geçerli bir URL olmalıdır.',
'after' => 'Girdiğiniz :attribute, :date tarihinden sonraki bir tarih olmalıdır.',
'after_or_equal' => ':attribute tarihi :date tarihinden sonra veya tarihine eşit olmalıdır.',
'after' =>
'Girdiğiniz :attribute, :date tarihinden sonraki bir tarih olmalıdır.',
'after_or_equal' =>
':attribute tarihi :date tarihinden sonra veya tarihine eşit olmalıdır.',
'alpha' => ':attribute sadece harflerden oluşmalıdır.',
'alpha_dash' => ':attribute sadece harfler, rakamlar ve tirelerden oluşmalıdır.',
'alpha_dash' =>
':attribute sadece harfler, rakamlar ve tirelerden oluşmalıdır.',
'alpha_num' => ':attribute sadece harfler ve rakamlar içermelidir.',
'array' => ':attribute dizi olmalıdır.',
'before' => ':attribute şundan daha önceki bir tarih olmalıdır :date.',
'before_or_equal' => ':attribute tarihi :date tarihinden önce veya tarihine eşit olmalıdır.',
'before_or_equal' =>
':attribute tarihi :date tarihinden önce veya tarihine eşit olmalıdır.',
'between' => [
'numeric' => ':attribute :min - :max arasında olmalıdır.',
'file' => ':attribute :min - :max arasındaki kilobayt değeri olmalıdır.',
'file' =>
':attribute :min - :max arasındaki kilobayt değeri olmalıdır.',
'string' => ':attribute :min - :max arasında karakterden oluşmalıdır.',
'array' => ':attribute :min - :max arasında nesneye sahip olmalıdır.',
],
......@@ -45,15 +49,15 @@ return [
'filled' => ':attribute alanının doldurulması zorunludur.',
'gt' => [
'numeric' => ':attribute, :value değerinden büyük olmalı.',
'file' => ':attribute, :value KB boyutundan büyük olmalı.',
'string' => ':attribute, :value karakterden uzun olmalı.',
'array' => ':attribute, :value taneden fazla olmalı.',
'file' => ':attribute, :value KB boyutundan büyük olmalı.',
'string' => ':attribute, :value karakterden uzun olmalı.',
'array' => ':attribute, :value taneden fazla olmalı.',
],
'gte' => [
'numeric' => ':attribute, :value kadar veya daha fazla olmalı.',
'file' => ':attribute, :value KB boyutu kadar veya daha büyük olmalı.',
'string' => ':attribute, :value karakter kadar veya daha uzun olmalı.',
'array' => ':attribute, :value tane veya daha fazla olmalı.',
'file' => ':attribute, :value KB boyutu kadar veya daha büyük olmalı.',
'string' => ':attribute, :value karakter kadar veya daha uzun olmalı.',
'array' => ':attribute, :value tane veya daha fazla olmalı.',
],
'image' => ':attribute alanı resim dosyası olmalıdır.',
'in' => ':attribute değeri geçersiz.',
......@@ -65,28 +69,31 @@ return [
'json' => ':attribute geçerli bir JSON değişkeni olmalıdır.',
'lt' => [
'numeric' => ':attribute, :value değerinden küçük olmalı.',
'file' => ':attribute, :value KB boyutundan küçük olmalı.',
'string' => ':attribute, :value karakterden kısa olmalı.',
'array' => ':attribute, :value taneden az olmalı.',
'file' => ':attribute, :value KB boyutundan küçük olmalı.',
'string' => ':attribute, :value karakterden kısa olmalı.',
'array' => ':attribute, :value taneden az olmalı.',
],
'lte' => [
'numeric' => ':attribute, :value kadar veya daha küçük olmalı.',
'file' => ':attribute, :value KB boyutu kadar veya daha küçük olmalı.',
'string' => ':attribute, :value karakter kadar veya daha kısa olmalı.',
'array' => ':attribute, :value tane veya daha az olmalı.',
'file' => ':attribute, :value KB boyutu kadar veya daha küçük olmalı.',
'string' => ':attribute, :value karakter kadar veya daha kısa olmalı.',
'array' => ':attribute, :value tane veya daha az olmalı.',
],
'max' => [
'numeric' => ':attribute değeri :max değerinden küçük olmalıdır.',
'file' => ':attribute değeri :max kilobayt değerinden küçük olmalıdır.',
'string' => ':attribute değeri :max karakter değerinden küçük olmalıdır.',
'array' => ':attribute değeri :max adedinden az nesneye sahip olmalıdır.',
'string' =>
':attribute değeri :max karakter değerinden küçük olmalıdır.',
'array' =>
':attribute değeri :max adedinden az nesneye sahip olmalıdır.',
],
'mimes' => ':attribute dosya biçimi :values olmalıdır.',
'mimetypes' => ':attribute dosya biçimi :values olmalıdır.',
'min' => [
'numeric' => ':attribute değeri :min değerinden büyük olmalıdır.',
'file' => ':attribute değeri :min kilobayt değerinden büyük olmalıdır.',
'string' => ':attribute değeri :min karakter değerinden büyük olmalıdır.',
'string' =>
':attribute değeri :min karakter değerinden büyük olmalıdır.',
'array' => ':attribute en az :min nesneye sahip olmalıdır.',
],
'not_in' => 'Seçili :attribute geçersiz.',
......@@ -95,12 +102,16 @@ return [
'present' => ':attribute alanı mevcut olmalıdır.',
'regex' => ':attribute biçimi geçersiz.',
'required' => ':attribute alanı gereklidir.',
'required_if' => ':attribute alanı, :other :value değerine sahip olduğunda zorunludur.',
'required_unless' => ':attribute alanı, :other alanı :value değerlerinden birine sahip olmadığında zorunludur.',
'required_if' =>
':attribute alanı, :other :value değerine sahip olduğunda zorunludur.',
'required_unless' =>
':attribute alanı, :other alanı :value değerlerinden birine sahip olmadığında zorunludur.',
'required_with' => ':attribute alanı :values varken zorunludur.',
'required_with_all' => ':attribute alanı herhangi bir :values değeri varken zorunludur.',
'required_with_all' =>
':attribute alanı herhangi bir :values değeri varken zorunludur.',
'required_without' => ':attribute alanı :values yokken zorunludur.',
'required_without_all' => ':attribute alanı :values değerlerinden herhangi biri yokken zorunludur.',
'required_without_all' =>
':attribute alanı :values değerlerinden herhangi biri yokken zorunludur.',
'same' => ':attribute ile :other eşleşmelidir.',
'size' => [
'numeric' => ':attribute :size olmalıdır.',
......
......@@ -3,47 +3,58 @@
@php(die())
@endif
<?php
use Illuminate\Support\Facades\DB;
use App\Permission;
$navServers = DB::select("SELECT * FROM \"server_groups\" WHERE \"servers\" LIKE \"%" . server()->id . "%\"");
$cleanServers = [];
foreach($navServers as $rawServers){
$servers = explode(",",$rawServers->servers);
foreach($servers as $server){
if(Permission::can(user()->id,"server","id",$server)){
array_push($cleanServers,$server);
}
@php
use Illuminate\Support\Facades\DB;
use App\Permission;
$navServers = DB::select(
"SELECT * FROM \"server_groups\" WHERE \"servers\" LIKE \"%" .
server()->id .
"%\""
);
$cleanServers = [];
foreach ($navServers as $rawServers) {
$servers = explode(",", $rawServers->servers);
foreach ($servers as $server) {
if (Permission::can(user()->id, "server", "id", $server)) {
array_push($cleanServers, $server);
}
}
}
$cleanServers = array_unique($cleanServers);
$cleanExtensions = [];
$cleanServers = array_unique($cleanServers);
$cleanExtensions = [];
$serverObjects = App\Server::find($cleanServers);
unset($cleanServers);
foreach($serverObjects as $server){
$cleanExtensions[$server->id . ":" . $server->name] = $server->extensions()->pluck('name', 'id')->toArray();
}
if(empty($cleanExtensions)){
$cleanExtensions[server()->id . ":" . server()->name] = server()->extensions()->pluck('name', 'id')->toArray();
}
$last = [];
$serverObjects = App\Server::find($cleanServers);
unset($cleanServers);
foreach ($serverObjects as $server) {
$cleanExtensions[$server->id . ":" . $server->name] = $server
->extensions()
->pluck('name', 'id')
->toArray();
}
if (empty($cleanExtensions)) {
$cleanExtensions[server()->id . ":" . server()->name] = server()
->extensions()
->pluck('name', 'id')
->toArray();
}
foreach($cleanExtensions as $serverobj=>$extensions){
list($server_id,$server_name) = explode(":",$serverobj);
foreach($extensions as $extension_id=>$extension_name){
$prefix = $extension_id . ":" . $extension_name;
$current = array_key_exists($prefix,$last) ? $last[$prefix] : [];
array_push($current,[
"id" => $server_id,
"name" => $server_name
]);
$last[$prefix] = $current;
}
$last = [];
foreach ($cleanExtensions as $serverobj => $extensions) {
list($server_id, $server_name) = explode(":", $serverobj);
foreach ($extensions as $extension_id => $extension_name) {
$prefix = $extension_id . ":" . $extension_name;
$current = array_key_exists($prefix, $last) ? $last[$prefix] : [];
array_push($current, [
"id" => $server_id,
"name" => $server_name,
]);
$last[$prefix] = $current;
}
?>
}
@endphp
@extends('layouts.app')
@section('content')
......
......@@ -16,13 +16,15 @@
<button href="#tab_1" type="button" class="btn btn-success" data-toggle="modal" data-target="#add_server">{{__("Sunucu Ekle")}}</button><br><br>
@endcan
@include('errors')
<?php
@php
use Illuminate\Support\Facades\DB;
$servers = servers();
foreach ($servers as $server){
$server->extension_count = DB::table('server_extensions')->where('server_id',$server->id)->count();
foreach ($servers as $server) {
$server->extension_count = DB::table('server_extensions')
->where('server_id', $server->id)
->count();
}
?>
@endphp
@include('table',[
"value" => $servers,
"title" => [
......
......@@ -174,22 +174,27 @@
],
"noInitialize" => "true"
])
<?php
@php
$input_extensions = [];
foreach ($available_extensions as $extension) {
$arr = [];
if (isset($extension->install)) {
foreach ($extension->install as $key => $parameter) {
$arr[$parameter["name"]] = $key . ":" . $parameter["type"];
foreach (
$extension->install
as $key => $parameter
) {
$arr[$parameter["name"]] =
$key . ":" . $parameter["type"];
}
}
$arr[$extension->name . ":" . $extension->id] = "extension_id:hidden";
$arr[$extension->name . ":" . $extension->id] =
"extension_id:hidden";
$input_extensions[] = [
"name" => $extension->name,
"id" => $extension->id
"id" => $extension->id,
];
}
?>
@endphp
</div>
{!! serverModuleViews() !!}
<div class="tab-pane fade show" id="filesTab" role="tabpanel">
......
......@@ -110,12 +110,14 @@
<pre id="output"></pre>
</div>
<div class="tab-pane fade show" id="servers" role="tabpanel">
<?php
$servers = servers();
foreach ($servers as $server){
$server->enabled = ($server->enabled) ? __("Aktif") : __("Pasif");
}
?>
@php
$servers = servers();
foreach ($servers as $server) {
$server->enabled = $server->enabled
? __("Aktif")
: __("Pasif");
}
@endphp
<button class="btn btn-success" onclick="serverStatus(true)" disabled>{{__("Aktifleştir")}}</button>
<button class="btn btn-danger" onchange="serverStatus(false)" disabled>{{__("Pasifleştir")}}</button><br><br>
@include('table',[
......
......@@ -15,16 +15,16 @@
<button class="btn btn-success" onclick="window.location.href = '{{route('widget_add_page')}}'">{{__("Bileşen Ekle")}}</button>
<br><br>
@include('errors')
<?php
foreach($widgets as $widget){
$extension = \App\Extension::find($widget->extension_id);
if($extension){
$widget->extension_name = $extension->name;
}else{
$widget->extension_name = "Eklenti Silinmiş";
}
@php
foreach ($widgets as $widget) {
$extension = \App\Extension::find($widget->extension_id);
if ($extension) {
$widget->extension_name = $extension->name;
} else {
$widget->extension_name = "Eklenti Silinmiş";
}
?>
}
@endphp
@include('table',[
"value" => $widgets,
"title" => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment