Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test-project
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Junaid Rahman pv
test-project
Commits
788e30a1
Commit
788e30a1
authored
Sep 01, 2016
by
Junaid Rahman pv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified tables and added extra functions
parent
1e394749
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
265 additions
and
30 deletions
+265
-30
_form.php
backend/modules/business/views/business/_form.php
+100
-6
create.php
backend/modules/business/views/business/create.php
+0
-1
index.php
backend/modules/business/views/business/index.php
+1
-1
_form.php
backend/modules/location/views/district/_form.php
+32
-7
create.php
backend/modules/location/views/district/create.php
+0
-1
index.php
backend/modules/location/views/district/index.php
+9
-2
_form.php
backend/modules/location/views/state/_form.php
+25
-7
create.php
backend/modules/location/views/state/create.php
+0
-2
index.php
backend/modules/location/views/state/index.php
+10
-3
common.php
backend/views/layouts/common.php
+0
-0
Business.php
common/models/Business.php
+30
-0
District.php
common/models/District.php
+29
-0
State.php
common/models/State.php
+29
-0
No files found.
backend/modules/business/views/business/_form.php
View file @
788e30a1
...
...
@@ -12,48 +12,142 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
();
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
Info
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'category_id'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'district_id'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'domain_name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'address'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'landmark'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'mobile_no'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'toll_free_no'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'contact_no'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'fax'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'email'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'description'
)
->
textarea
([
'rows'
=>
6
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'logo_base_url'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'logo_path'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'latitude'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'log
itude'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'lat
itude'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
()
?>
</div>
</div>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
(
)
?>
<?=
$form
->
field
(
$model
,
'logitude'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
())
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/business/views/business/create.php
View file @
788e30a1
...
...
@@ -12,7 +12,6 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div
class=
"business-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
...
...
backend/modules/business/views/business/index.php
View file @
788e30a1
...
...
@@ -24,7 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
//
'id',
'category_id'
,
'district_id'
,
'domain_name'
,
...
...
backend/modules/location/views/district/_form.php
View file @
788e30a1
...
...
@@ -2,6 +2,8 @@
use
yii\helpers\Html
;
use
yii\widgets\ActiveForm
;
use
yii\helpers\ArrayHelper
;
use
common\models\State
;
/* @var $this yii\web\View */
/* @var $model common\models\District */
...
...
@@ -12,20 +14,43 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'state_id'
)
->
textInput
()
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
Info
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
<?=
$form
->
field
(
$model
,
'state_id'
)
->
dropDownList
(
ArrayHelper
::
map
(
State
::
find
()
->
all
(),
'id'
,
'name'
)
)
?>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
(
)
?>
<?php
echo
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
(
)
?>
<?php
echo
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
())
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/location/views/district/create.php
View file @
788e30a1
...
...
@@ -12,7 +12,6 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div
class=
"district-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
...
...
backend/modules/location/views/district/index.php
View file @
788e30a1
...
...
@@ -24,11 +24,18 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
//
'id',
'state_id'
,
'name'
,
'slug'
,
'status'
,
[
'class'
=>
\common\grid\EnumColumn
::
className
(),
'attribute'
=>
'status'
,
'enum'
=>
[
Yii
::
t
(
'backend'
,
'In Active'
),
Yii
::
t
(
'backend'
,
'Active'
)
],
],
// 'created_at',
// 'updated_at',
...
...
backend/modules/location/views/state/_form.php
View file @
788e30a1
...
...
@@ -12,18 +12,36 @@ use yii\widgets\ActiveForm;
<?php
$form
=
ActiveForm
::
begin
();
?>
<?=
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<?=
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
])
?>
<div
id=
"myTabContent"
class=
"tab-content"
>
<div
class=
"tab-pane fade in active"
id=
"info"
>
<div
class=
"page-header"
>
<h3>
Info
</h3>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
textInput
(
)
?>
<?php
echo
$form
->
field
(
$model
,
'name'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
<?=
$form
->
field
(
$model
,
'created_at'
)
->
textInput
()
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$form
->
field
(
$model
,
'updated_at'
)
->
textInput
(
)
?>
<?php
echo
$form
->
field
(
$model
,
'slug'
)
->
textInput
([
'maxlength'
=>
true
]
)
?>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-3"
>
<?=
$form
->
field
(
$model
,
'status'
)
->
dropDownList
(
$model
::
statuses
())
?>
</div>
</div>
<div
class=
"form-group"
>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
<?=
Html
::
submitButton
(
$model
->
isNewRecord
?
Yii
::
t
(
'backend'
,
'Create'
)
:
Yii
::
t
(
'backend'
,
'Update'
),
[
'class'
=>
$model
->
isNewRecord
?
'btn btn-success'
:
'btn btn-primary'
])
?>
</div>
</div>
</div>
<?php
ActiveForm
::
end
();
?>
...
...
backend/modules/location/views/state/create.php
View file @
788e30a1
...
...
@@ -12,8 +12,6 @@ $this->params['breadcrumbs'][] = $this->title;
?>
<div
class=
"state-create"
>
<h1>
<?=
Html
::
encode
(
$this
->
title
)
?>
</h1>
<?=
$this
->
render
(
'_form'
,
[
'model'
=>
$model
,
])
?>
...
...
backend/modules/location/views/state/index.php
View file @
788e30a1
...
...
@@ -24,11 +24,18 @@ $this->params['breadcrumbs'][] = $this->title;
'columns'
=>
[
[
'class'
=>
'yii\grid\SerialColumn'
],
'id'
,
//
'id',
'name'
,
'slug'
,
'status'
,
'created_at'
,
[
'class'
=>
\common\grid\EnumColumn
::
className
(),
'attribute'
=>
'status'
,
'enum'
=>
[
Yii
::
t
(
'backend'
,
'In Active'
),
Yii
::
t
(
'backend'
,
'Active'
)
],
],
//'created_at',
// 'updated_at',
[
'class'
=>
'yii\grid\ActionColumn'
],
...
...
backend/views/layouts/common.php
View file @
788e30a1
This diff is collapsed.
Click to expand it.
common/models/Business.php
View file @
788e30a1
...
...
@@ -3,6 +3,8 @@
namespace
common\models
;
use
Yii
;
use
yii\behaviors\SluggableBehavior
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "{{%business}}".
...
...
@@ -34,6 +36,9 @@ use Yii;
*/
class
Business
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
0
;
/**
* @inheritdoc
*/
...
...
@@ -45,6 +50,23 @@ class Business extends \yii\db\ActiveRecord
/**
* @inheritdoc
*/
public
function
behaviors
()
{
return
[
[
'class'
=>
SluggableBehavior
::
className
(),
'attribute'
=>
'name'
,
'immutable'
=>
true
],
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
]
];
}
public
function
rules
()
{
return
[
...
...
@@ -116,4 +138,12 @@ class Business extends \yii\db\ActiveRecord
{
return
new
\common\models\query\BusinessQuery
(
get_called_class
());
}
public
static
function
statuses
()
{
return
[
self
::
STATUS_ACTIVE
=>
Yii
::
t
(
'common'
,
'Active'
),
self
::
STATUS_IN_ACTIVE
=>
Yii
::
t
(
'common'
,
'In Active'
),
];
}
}
common/models/District.php
View file @
788e30a1
...
...
@@ -3,6 +3,8 @@
namespace
common\models
;
use
Yii
;
use
yii\behaviors\SluggableBehavior
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "{{%district}}".
...
...
@@ -20,6 +22,9 @@ use Yii;
*/
class
District
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
0
;
/**
* @inheritdoc
*/
...
...
@@ -28,6 +33,22 @@ class District extends \yii\db\ActiveRecord
return
'{{%district}}'
;
}
public
function
behaviors
()
{
return
[
[
'class'
=>
SluggableBehavior
::
className
(),
'attribute'
=>
'name'
,
'immutable'
=>
true
],
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
]
];
}
/**
* @inheritdoc
*/
...
...
@@ -81,4 +102,12 @@ class District extends \yii\db\ActiveRecord
{
return
new
\common\models\query\DistrictQuery
(
get_called_class
());
}
public
static
function
statuses
()
{
return
[
self
::
STATUS_ACTIVE
=>
Yii
::
t
(
'common'
,
'Active'
),
self
::
STATUS_IN_ACTIVE
=>
Yii
::
t
(
'common'
,
'In Active'
),
];
}
}
common/models/State.php
View file @
788e30a1
...
...
@@ -3,6 +3,8 @@
namespace
common\models
;
use
Yii
;
use
yii\behaviors\SluggableBehavior
;
use
yii\behaviors\TimestampBehavior
;
/**
* This is the model class for table "{{%state}}".
...
...
@@ -18,6 +20,9 @@ use Yii;
*/
class
State
extends
\yii\db\ActiveRecord
{
const
STATUS_ACTIVE
=
1
;
const
STATUS_IN_ACTIVE
=
0
;
/**
* @inheritdoc
*/
...
...
@@ -26,6 +31,22 @@ class State extends \yii\db\ActiveRecord
return
'{{%state}}'
;
}
public
function
behaviors
()
{
return
[
[
'class'
=>
SluggableBehavior
::
className
(),
'attribute'
=>
'name'
,
'immutable'
=>
true
],
[
'class'
=>
TimestampBehavior
::
className
(),
'createdAtAttribute'
=>
'created_at'
,
'updatedAtAttribute'
=>
'updated_at'
]
];
}
/**
* @inheritdoc
*/
...
...
@@ -69,4 +90,12 @@ class State extends \yii\db\ActiveRecord
{
return
new
\common\models\query\StateQuery
(
get_called_class
());
}
public
static
function
statuses
()
{
return
[
self
::
STATUS_ACTIVE
=>
Yii
::
t
(
'common'
,
'Active'
),
self
::
STATUS_IN_ACTIVE
=>
Yii
::
t
(
'common'
,
'In Active'
),
];
}
}
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