Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
8fbd35d4
Commit
8fbd35d4
authored
4 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
renamed sprueche to zitate
parent
d8657b10
No related branches found
Branches containing commit
No related tags found
2 merge requests
!1597
Development
,
!1594
Resolve "Make Quotes Optional by settings"
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/Http/Controllers/SettingsController.php
+4
-4
4 additions, 4 deletions
app/Http/Controllers/SettingsController.php
app/MetaGer.php
+2
-2
2 additions, 2 deletions
app/MetaGer.php
resources/views/settings/index.blade.php
+4
-4
4 additions, 4 deletions
resources/views/settings/index.blade.php
with
10 additions
and
10 deletions
app/Http/Controllers/SettingsController.php
+
4
−
4
View file @
8fbd35d4
...
@@ -196,7 +196,7 @@ class SettingsController extends Controller
...
@@ -196,7 +196,7 @@ class SettingsController extends Controller
$fokus
=
$request
->
input
(
'fokus'
,
''
);
$fokus
=
$request
->
input
(
'fokus'
,
''
);
$url
=
$request
->
input
(
'url'
,
''
);
$url
=
$request
->
input
(
'url'
,
''
);
// Currently only the setting for quotes is supported
// Currently only the setting for quotes is supported
$quotes
=
$request
->
input
(
'
spruech
e'
,
''
);
$quotes
=
$request
->
input
(
'
zitat
e'
,
''
);
if
(
empty
(
$fokus
)
||
empty
(
$quotes
))
{
if
(
empty
(
$fokus
)
||
empty
(
$quotes
))
{
abort
(
404
);
abort
(
404
);
}
}
...
@@ -204,13 +204,13 @@ class SettingsController extends Controller
...
@@ -204,13 +204,13 @@ class SettingsController extends Controller
if
(
$quotes
===
"off"
){
if
(
$quotes
===
"off"
){
$path
=
\Request
::
path
();
$path
=
\Request
::
path
();
$cookiePath
=
"/"
.
substr
(
$path
,
0
,
strpos
(
$path
,
"meta/"
)
+
5
);
$cookiePath
=
"/"
.
substr
(
$path
,
0
,
strpos
(
$path
,
"meta/"
)
+
5
);
Cookie
::
queue
(
$fokus
.
"_setting_
spruech
e"
,
"off"
,
0
,
$cookiePath
,
null
,
false
,
false
);
Cookie
::
queue
(
$fokus
.
"_setting_
zitat
e"
,
"off"
,
0
,
$cookiePath
,
null
,
false
,
false
);
}
elseif
(
$quotes
===
"on"
)
{
}
elseif
(
$quotes
===
"on"
)
{
$path
=
\Request
::
path
();
$path
=
\Request
::
path
();
$cookiePath
=
"/"
.
substr
(
$path
,
0
,
strpos
(
$path
,
"meta/"
)
+
5
);
$cookiePath
=
"/"
.
substr
(
$path
,
0
,
strpos
(
$path
,
"meta/"
)
+
5
);
Cookie
::
queue
(
$fokus
.
"_setting_
spruech
e"
,
""
,
0
,
$cookiePath
,
null
,
false
,
false
);
Cookie
::
queue
(
$fokus
.
"_setting_
zitat
e"
,
""
,
0
,
$cookiePath
,
null
,
false
,
false
);
}
else
{
}
else
{
dd
(
$quotes
);
abort
(
404
);
}
}
return
redirect
(
LaravelLocalization
::
getLocalizedURL
(
LaravelLocalization
::
getCurrentLocale
(),
route
(
'settings'
,
[
"fokus"
=>
$fokus
,
"url"
=>
$url
])));
return
redirect
(
LaravelLocalization
::
getLocalizedURL
(
LaravelLocalization
::
getCurrentLocale
(),
route
(
'settings'
,
[
"fokus"
=>
$fokus
,
"url"
=>
$url
])));
...
...
This diff is collapsed.
Click to expand it.
app/MetaGer.php
+
2
−
2
View file @
8fbd35d4
...
@@ -951,12 +951,12 @@ class MetaGer
...
@@ -951,12 +951,12 @@ class MetaGer
$this
->
agent
=
new
Agent
();
$this
->
agent
=
new
Agent
();
$this
->
mobile
=
$this
->
agent
->
isMobile
();
$this
->
mobile
=
$this
->
agent
->
isMobile
();
# Sprüche
# Sprüche
if
(
!
App
::
isLocale
(
"de"
)
||
(
\Cookie
::
has
(
$this
->
getFokus
()
.
'_setting_
spruech
e'
)
&&
\Cookie
::
get
(
$this
->
getFokus
()
.
'_setting_
spruech
e'
)
===
"off"
))
{
if
(
!
App
::
isLocale
(
"de"
)
||
(
\Cookie
::
has
(
$this
->
getFokus
()
.
'_setting_
zitat
e'
)
&&
\Cookie
::
get
(
$this
->
getFokus
()
.
'_setting_
zitat
e'
)
===
"off"
))
{
$this
->
sprueche
=
"off"
;
$this
->
sprueche
=
"off"
;
}
else
{
}
else
{
$this
->
sprueche
=
"on"
;
$this
->
sprueche
=
"on"
;
}
}
if
(
$request
->
filled
(
"
spruech
e"
)
&&
$request
->
input
(
'
spruech
e'
)
===
"on"
||
$request
->
input
(
'
spruech
e'
)
===
"off"
){
if
(
$request
->
filled
(
"
zitat
e"
)
&&
$request
->
input
(
'
zitat
e'
)
===
"on"
||
$request
->
input
(
'
zitat
e'
)
===
"off"
){
$this
->
sprueche
=
$request
->
input
(
'quotes'
);
$this
->
sprueche
=
$request
->
input
(
'quotes'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/views/settings/index.blade.php
+
4
−
4
View file @
8fbd35d4
...
@@ -91,10 +91,10 @@
...
@@ -91,10 +91,10 @@
<
input
type
=
"hidden"
name
=
"fokus"
value
=
"{{
$fokus
}}"
>
<
input
type
=
"hidden"
name
=
"fokus"
value
=
"{{
$fokus
}}"
>
<
input
type
=
"hidden"
name
=
"url"
value
=
"{{
$url
}}"
>
<
input
type
=
"hidden"
name
=
"url"
value
=
"{{
$url
}}"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"
sprueche"
>
Sprüch
e
</
label
>
<
label
for
=
"
zitate"
>
Zitat
e
</
label
>
<
select
name
=
"
sprueche"
id
=
"spruech
e"
class
=
"form-control"
>
<
select
name
=
"
zitate"
id
=
"zitat
e"
class
=
"form-control"
>
<
option
value
=
"on"
@
if
(
Cookie
::
get
(
$fokus
.
"_setting_
spruech
e"
)
===
null
)
disabled
selected
@
endif
>
Anzeigen
</
option
>
<
option
value
=
"on"
@
if
(
Cookie
::
get
(
$fokus
.
"_setting_
zitat
e"
)
===
null
)
disabled
selected
@
endif
>
Anzeigen
</
option
>
<
option
value
=
"off"
{{
Cookie
::
get
(
$fokus
.
"_setting_
spruech
e"
)
===
"off"
?
"disabled selected"
:
""
}}
>
Nicht
Anzeigen
</
option
>
<
option
value
=
"off"
{{
Cookie
::
get
(
$fokus
.
"_setting_
zitat
e"
)
===
"off"
?
"disabled selected"
:
""
}}
>
Nicht
Anzeigen
</
option
>
</
select
>
</
select
>
</
div
>
</
div
>
<
button
type
=
"submit"
class
=
"btn btn-default"
>@
lang
(
'settings.save'
)
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-default"
>@
lang
(
'settings.save'
)
</
button
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment