Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
a2f5d491
Commit
a2f5d491
authored
Nov 06, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
74c63b82
'
* commit '
74c63b82
': Squashed 'Modules/Core/' changes from 3c53b2a..a064d78
parents
762043f1
74c63b82
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
66 additions
and
24 deletions
+66
-24
.sensiolabs.yml
Modules/Core/.sensiolabs.yml
+3
-0
.travis.yml
Modules/Core/.travis.yml
+6
-0
config.php
Modules/Core/Config/config.php
+10
-0
settings.php
Modules/Core/Config/settings.php
+4
-0
CoreDatabaseSeeder.php
Modules/Core/Database/Seeders/CoreDatabaseSeeder.php
+11
-12
BaseRepository.php
Modules/Core/Repositories/BaseRepository.php
+10
-7
EloquentBaseRepository.php
...les/Core/Repositories/Eloquent/EloquentBaseRepository.php
+9
-5
settings.php
Modules/Core/Resources/lang/en/settings.php
+1
-0
settings.php
Modules/Core/Resources/lang/fr/settings.php
+1
-0
select-theme.blade.php
Modules/Core/Resources/views/fields/select-theme.blade.php
+10
-0
master.blade.php
Modules/Core/Resources/views/layouts/master.blade.php
+1
-0
No files found.
Modules/Core/.sensiolabs.yml
0 → 100644
View file @
a2f5d491
rules
:
php.interface_has_no_interface_suffix
:
enabled
:
false
Modules/Core/.travis.yml
0 → 100644
View file @
a2f5d491
language
:
php
php
:
-
5.6
-
5.5
-
5.4
-
hhvm
Modules/Core/Config/config.php
View file @
a2f5d491
...
...
@@ -11,5 +11,15 @@ return [
'Dashboard'
,
'User'
,
'Workshop'
],
/*
|--------------------------------------------------------------------------
| Specify all the front-end themes
| These will be available as a core setting
|--------------------------------------------------------------------------
*/
'front-themes'
=>
[
'bootstrap'
,
'default'
]
];
Modules/Core/Config/settings.php
View file @
a2f5d491
...
...
@@ -11,4 +11,8 @@ return [
'view'
=>
'textarea'
,
'translatable'
=>
true
],
'template'
=>
[
'description'
=>
trans
(
'core::settings.template'
),
'view'
=>
'core::fields.select-theme'
],
];
Modules/Core/Database/Seeders/CoreDatabaseSeeder.php
View file @
a2f5d491
...
...
@@ -3,18 +3,17 @@
use
Illuminate\Database\Seeder
;
use
Illuminate\Database\Eloquent\Model
;
class
CoreDatabaseSeeder
extends
Seeder
{
class
CoreDatabaseSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
Model
::
unguard
();
// $this->call("OthersTableSeeder");
}
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
Model
::
unguard
();
}
}
Modules/Core/Repositories/BaseRepository.php
View file @
a2f5d491
...
...
@@ -7,17 +7,19 @@
interface
BaseRepository
{
/**
* @param $id
* @return
mixed
* @param
int
$id
* @return
$model
*/
public
function
find
(
$id
);
/**
* Return a collection of all elements of the resource
* @return mixed
*/
public
function
all
();
/**
* Create a resource
* @param $data
* @return mixed
*/
...
...
@@ -25,15 +27,16 @@ interface BaseRepository
/**
* Update a resource
* @param $
id
* @param $data
* @param $
model
* @param
array
$data
* @return mixed
*/
public
function
update
(
$
id
,
$data
);
public
function
update
(
$
model
,
$data
);
/**
* @param $ids
* Destroy a resource
* @param $model
* @return mixed
*/
public
function
destroy
(
$
ids
);
public
function
destroy
(
$
model
);
}
Modules/Core/Repositories/Eloquent/EloquentBaseRepository.php
View file @
a2f5d491
<?php
namespace
Modules\Core\Repositories\Eloquent
;
use
Illuminate\Database\Eloquent\Model
;
use
Modules\Core\Repositories\BaseRepository
;
/**
...
...
@@ -17,7 +16,7 @@ abstract class EloquentBaseRepository implements BaseRepository
/**
* @param Model $model
*/
public
function
__construct
(
Model
$model
)
public
function
__construct
(
$model
)
{
$this
->
model
=
$model
;
}
...
...
@@ -48,12 +47,17 @@ abstract class EloquentBaseRepository implements BaseRepository
return
$this
->
model
->
create
(
$data
);
}
public
function
update
(
$model
,
$data
)
{
return
$model
->
update
(
$data
);
}
/**
* @param
int|int[] $ids
* @param
Model $model
* @return mixed
*/
public
function
destroy
(
$
ids
)
public
function
destroy
(
$
model
)
{
return
$
this
->
model
->
destroy
(
$ids
);
return
$
model
->
delete
(
);
}
}
Modules/Core/Resources/lang/en/settings.php
View file @
a2f5d491
...
...
@@ -3,4 +3,5 @@
return
[
'site-name'
=>
'Site name'
,
'site-description'
=>
'Site description'
,
'template'
=>
'Front end template'
,
];
Modules/Core/Resources/lang/fr/settings.php
View file @
a2f5d491
...
...
@@ -3,4 +3,5 @@
return
[
'site-name'
=>
'Nom du site'
,
'site-description'
=>
'Description du site'
,
'template'
=>
'Template front end'
,
];
Modules/Core/Resources/views/fields/select-theme.blade.php
0 → 100644
View file @
a2f5d491
<div
class=
"form-group"
>
<label
for=
"{{ $settingName }}"
>
{{ $moduleInfo['description'] }}
</label>
<select
class=
"form-control"
name=
"{{ $settingName }}"
id=
"{{ $settingName }}"
>
<?php
foreach
(
Config
::
get
(
'core::config.front-themes'
)
as
$theme
)
:
?>
<option
value=
"{{ $theme }}"
{{
isset
($
dbSettings
[$
settingName
])
&&
$
dbSettings
[$
settingName
]
-
>
plainValue == $theme ? 'selected' : '' }}>
{{ ucfirst($theme) }}
</option>
<?php
endforeach
;
?>
</select>
</div>
Modules/Core/Resources/views/layouts/master.blade.php
View file @
a2f5d491
...
...
@@ -31,6 +31,7 @@
<![endif]-->
</head>
<body
class=
"skin-blue"
>
@include('flash::message')
<header
class=
"header"
>
<a
href=
"{{ URL::route('dashboard.index') }}"
class=
"logo"
>
<?php
if
(
isset
(
$sitename
))
:
?>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment