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
57283722
Commit
57283722
authored
Sep 27, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switching the migrate module name input to a select
parent
d662f634
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
1 deletion
+32
-1
MigrateViewComposer.php
Composers/MigrateViewComposer.php
+21
-0
ModuleManager.php
Manager/ModuleManager.php
+9
-0
migrate.blade.php
Resources/views/admin/workbench/tabs/migrate.blade.php
+1
-1
composers.php
composers.php
+1
-0
No files found.
Composers/MigrateViewComposer.php
0 → 100644
View file @
57283722
<?php
namespace
Modules\Workshop\Composers
;
use
Modules\Workshop\Manager\ModuleManager
;
class
MigrateViewComposer
{
/**
* @var ModuleManager
*/
private
$module
;
public
function
__construct
(
ModuleManager
$module
)
{
$this
->
module
=
$module
;
}
public
function
compose
(
$view
)
{
$view
->
modules
=
$this
->
module
->
enabled
();
}
}
\ No newline at end of file
Manager/ModuleManager.php
View file @
57283722
...
...
@@ -33,6 +33,15 @@ class ModuleManager
return
$this
->
module
->
all
();
}
/**
* Return all the enabled modules
* @return array
*/
public
function
enabled
()
{
return
$this
->
module
->
enabled
();
}
/**
* Get the core modules that shouldn't be disabled
* @return array|mixed
...
...
Resources/views/admin/workbench/tabs/migrate.blade.php
View file @
57283722
...
...
@@ -3,7 +3,7 @@
<
div
class
="
box
-
body
">
<div class='form-group{{
$errors->has
('module') ? ' has-error' : '' }}'>
{!! Form::label('module', 'Module Name:') !!}
{!! Form::
text('module', Input::old('name'), ['class' => 'form-control', 'placeholder' => 'Module Name
']) !!}
{!! Form::
select('module',
$modules
, null, ['class' => 'form-control
']) !!}
{!!
$errors->first
('module', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
...
...
composers.php
View file @
57283722
<?php
View
::
composer
(
'core::partials.sidebar-nav'
,
'Modules\Workshop\Composers\SidebarViewComposer'
);
View
::
composer
(
'workshop::admin.workbench.tabs.migrate'
,
'Modules\Workshop\Composers\MigrateViewComposer'
);
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