Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TimeOut
TimeOutAdmin
Commits
1a7a3108
Commit
1a7a3108
authored
Feb 18, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
d4a5f42d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
108 additions
and
44 deletions
+108
-44
Event.php
application/controllers/Event.php
+4
-2
Venue.php
application/controllers/Venue.php
+10
-4
eventAddForm.php
application/views/Event/eventAddForm.php
+0
-0
eventEditForm.php
application/views/Event/eventEditForm.php
+0
-0
viewEventDetails.php
application/views/Event/viewEventDetails.php
+41
-27
venueAddForm.php
application/views/Venue/venueAddForm.php
+0
-0
custom-style.css
assets/css/custom-style.css
+22
-0
custom-script.js
assets/js/custom-script.js
+31
-11
No files found.
application/controllers/Event.php
View file @
1a7a3108
...
...
@@ -91,7 +91,8 @@ class Event extends CI_Controller {
$cstmSeatLayout
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$_POST
[
'seat_color'
])
;
$i
++
){
$cstmSeatLayout
[]
=
array
(
'color'
=>
$_POST
[
'seat_color'
][
$i
],
'price'
=>
$_POST
[
'seat_price'
][
$i
]);
'price'
=>
$_POST
[
'seat_price'
][
$i
],
'capacity'
=>
$_POST
[
'seat_capacity'
][
$i
]);
}
$_POST
[
'custom_seat_layout'
]
=
json_encode
(
$cstmSeatLayout
);
}
else
{
...
...
@@ -236,7 +237,8 @@ class Event extends CI_Controller {
$cstmSeatLayout
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$_POST
[
'seat_color'
])
;
$i
++
){
$cstmSeatLayout
[]
=
array
(
'color'
=>
$_POST
[
'seat_color'
][
$i
],
'price'
=>
$_POST
[
'seat_price'
][
$i
]);
'price'
=>
$_POST
[
'seat_price'
][
$i
],
'capacity'
=>
$_POST
[
'seat_capacity'
][
$i
]);
}
$_POST
[
'custom_seat_layout'
]
=
json_encode
(
$cstmSeatLayout
);
}
else
{
...
...
application/controllers/Venue.php
View file @
1a7a3108
...
...
@@ -89,8 +89,11 @@ class Venue extends CI_Controller {
$seatLayoutDetails
=
array
();
foreach
(
$_POST
[
'seat_color'
]
AS
$index
=>
$value
){
$seatLayoutDetails
[]
=
array
(
'color'
=>
$value
,
'price'
=>
$_POST
[
'seat_price'
][
$index
]);
$seatLayoutDetails
[]
=
array
(
'color'
=>
$value
,
'price'
=>
$_POST
[
'seat_price'
][
$index
],
'capacity'
=>
$_POST
[
'seat_capacity'
][
$index
]);
}
$_POST
[
'layout_details'
]
=
json_encode
(
$seatLayoutDetails
);
}
else
{
$_POST
[
'layout'
]
=
$_POST
[
'layout_details'
]
=
''
;
...
...
@@ -111,7 +114,7 @@ class Venue extends CI_Controller {
$_POST
[
'location_lat'
]
=
$locData
[
'lat'
];
$_POST
[
'location_lng'
]
=
$locData
[
'lng'
];
unset
(
$_POST
[
'has_layout'
],
$_POST
[
'seat_color'
],
$_POST
[
'seat_price'
]);
unset
(
$_POST
[
'has_layout'
],
$_POST
[
'seat_color'
],
$_POST
[
'seat_price'
]
,
$_POST
[
'seat_capacity'
]
);
$status
=
$this
->
Venue_model
->
createVenue
(
$_POST
);
if
(
$status
==
1
){
...
...
@@ -193,8 +196,11 @@ class Venue extends CI_Controller {
$seatLayoutDetails
=
array
();
foreach
(
$_POST
[
'seat_color'
]
AS
$index
=>
$value
){
$seatLayoutDetails
[]
=
array
(
'color'
=>
$value
,
'price'
=>
$_POST
[
'seat_price'
][
$index
]);
$seatLayoutDetails
[]
=
array
(
'color'
=>
$value
,
'price'
=>
$_POST
[
'seat_price'
][
$index
],
'capacity'
=>
$_POST
[
'seat_capacity'
][
$index
]);
}
$_POST
[
'layout_details'
]
=
json_encode
(
$seatLayoutDetails
);
}
else
{
$_POST
[
'layout'
]
=
$_POST
[
'layout_details'
]
=
''
;
...
...
@@ -215,7 +221,7 @@ class Venue extends CI_Controller {
$_POST
[
'location_lat'
]
=
$locData
[
'lat'
];
$_POST
[
'location_lng'
]
=
$locData
[
'lng'
];
unset
(
$_POST
[
'has_layout'
],
$_POST
[
'seat_color'
],
$_POST
[
'seat_price'
]);
unset
(
$_POST
[
'has_layout'
],
$_POST
[
'seat_color'
],
$_POST
[
'seat_price'
]
,
$_POST
[
'seat_capacity'
]
);
$status
=
$this
->
Venue_model
->
updateVenues
(
decode_param
(
$venue_id
),
$_POST
);
if
(
$status
==
1
){
...
...
application/views/Event/eventAddForm.php
View file @
1a7a3108
This diff is collapsed.
Click to expand it.
application/views/Event/eventEditForm.php
View file @
1a7a3108
This diff is collapsed.
Click to expand it.
application/views/Event/viewEventDetails.php
View file @
1a7a3108
...
...
@@ -126,38 +126,52 @@
</div>
<div
class=
"col-sm-8 padTop30"
>
<div
class=
"col-sm-12 marginTop-8"
>
<div
class=
"col-sm-3"
>
<strong>
Seat Division
</strong>
</div>
<div
class=
"col-sm-3"
>
<strong>
Seat Pricing
</strong>
</div>
<div
class=
"col-sm-4"
>
<strong>
Seating Capacity
</strong>
</div>
</div>
<div
class=
"box-header with-border padHead marginBottom-10"
style=
"width:410px;"
></div>
<?php
if
(
$event
->
show_layout
==
1
){
if
(
!
empty
(
$event
->
custom_seat_layout
)
&&
!
empty
(
$custlayoutDtls
=
json_decode
(
$event
->
custom_seat_layout
,
true
))){
?>
<div
class=
"col-sm-12"
>
<?php
foreach
(
$custlayoutDtls
AS
$lyDtls
){
?>
<div
class=
"col-sm-12 marginTop-8"
>
<div
class=
"col-sm-4"
>
<strong>
<?=
$lyDtls
[
'color'
]
?>
</strong>
block
</div>
<div
class=
"col-sm-8"
>
<strong>
<?=
$lyDtls
[
'price'
]
?>
</strong>
/ Seat
</div>
!
empty
(
$custlayoutDtls
=
json_decode
(
$event
->
custom_seat_layout
,
true
))){
foreach
(
$custlayoutDtls
AS
$lyDtls
){
?>
<div
class=
"col-sm-12 marginTop-8"
>
<div
class=
"col-sm-3"
>
<strong>
<?=
$lyDtls
[
'color'
]
?>
</strong>
block
</div>
<?php
}
?>
</div>
<?php
}
else
{
$layoutDtls
=
json_decode
(
$event
->
layout_details
,
true
);
?>
<div
class=
"col-sm-12"
>
<?php
foreach
(
$layoutDtls
AS
$lyDtls
){
?>
<div
class=
"col-sm-12 marginTop-8"
>
<div
class=
"col-sm-4"
>
<strong>
<?=
$lyDtls
[
'color'
]
?>
</strong>
block
</div>
<div
class=
"col-sm-8"
>
<strong>
<?=
$lyDtls
[
'price'
]
?>
</strong>
/ Seat
</div>
<div
class=
"col-sm-3"
>
<strong>
<?=
$lyDtls
[
'price'
]
?>
</strong>
/ Seat
</div>
<?php
}
?>
</div>
<?php
}
?>
<?php
}
?>
<div
class=
"col-sm-4"
>
<strong>
<?=
$lyDtls
[
'capacity'
]
?>
</strong>
Seats / Division
</div>
</div>
<?php
}
}
else
{
$layoutDtls
=
json_decode
(
$event
->
layout_details
,
true
);
foreach
(
$layoutDtls
AS
$lyDtls
){
?>
<div
class=
"col-sm-12 marginTop-8"
>
<div
class=
"col-sm-3"
>
<strong>
<?=
$lyDtls
[
'color'
]
?>
</strong>
block
</div>
<div
class=
"col-sm-3"
>
<strong>
<?=
$lyDtls
[
'price'
]
?>
</strong>
/ Seat
</div>
<div
class=
"col-sm-4"
>
<strong>
<?=
$lyDtls
[
'capacity'
]
?>
</strong>
Seats / Division
</div>
</div>
<?php
}
}
}
?>
</div>
</div>
<?php
}
?>
...
...
application/views/Venue/venueAddForm.php
View file @
1a7a3108
This diff is collapsed.
Click to expand it.
assets/css/custom-style.css
View file @
1a7a3108
...
...
@@ -325,6 +325,10 @@
padding-bottom
:
20px
!important
;
}
.padBottom30
{
padding-bottom
:
30px
!important
;
}
.padTop0
{
padding-top
:
0px
!important
;
}
...
...
@@ -361,6 +365,10 @@
margin-top
:
10px
!important
;
}
.marginTop37
{
margin-top
:
37px
!important
;
}
.padRight-5p
{
padding-right
:
5%
!important
;
}
...
...
@@ -381,6 +389,10 @@
padding-left
:
10px
!important
;
}
.padLeft15
{
padding-left
:
15px
!important
;
}
.padLeft20
{
padding-left
:
20px
!important
;
}
...
...
@@ -637,4 +649,13 @@
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.layoutDivHead
{
margin-top
:
10px
;
}
.hrClass
{
margin-top
:
0px
;
margin-bottom
:
15px
;
}
\ No newline at end of file
assets/js/custom-script.js
View file @
1a7a3108
...
...
@@ -154,23 +154,36 @@ jQuery('[id="viewVenueDetails"]').on('click',function() {
}
});
var
layoutHtml
=
''
;
var
layoutHtml
=
''
,
innerLyOut
=
''
;
if
(
venue_data
[
'show_layout'
]
==
'1'
){
layoutHtml
=
'<div class="col-md-6">'
+
'<div class="row"><label>Layout Details</label></div>'
+
'<div class="row"> '
+
'<div class="col-md-7
" style="text-align:center;"> '
+
'<img id="driverLicenceImg" src="'
+
base_url
+
venue_data
[
'layout'
]
+
'"'
+
'style="margin-top:10px;width:auto;max-width:225px;height:225
px;" />'
+
'</div><br
>'
;
layoutHtml
=
'<div class="col-md-6">'
+
'<div class="row"><label>Layout Details</label></div>'
+
'<div class="row"> '
+
'<div class="col-md-6
" style="text-align:center;"> '
+
'<img id="driverLicenceImg" src="'
+
base_url
+
venue_data
[
'layout'
]
+
'"'
+
'style="margin-top:10px;width:auto;max-width:200px;height:200
px;" />'
+
'</div
>'
;
jQuery
.
each
(
jQuery
.
parseJSON
(
venue_data
[
'layout_details'
]),
function
(
indexLayout
,
layoutValue
)
{
layoutHtml
+=
'<div class="col-md-5">'
+
'<label>'
+
layoutValue
[
'color'
]
+
'</label> Block <label>'
+
layoutValue
[
'price'
]
+
'</label> /Seat'
+
innerLyOut
+=
'<div>'
+
'<div onclick="showLyDivDtls(jQuery(this))" class="cpoint">'
+
'<i class="fa fa-caret-square-o-down" aria-hidden="true"></i>'
+
'<label class="padLeft10">'
+
layoutValue
[
'color'
]
+
'</label> Block'
+
'</div>'
+
'<div class="hide">'
+
'<div class="padLeft40"><label>'
+
layoutValue
[
'price'
]
+
'</label> /Seat</div>'
+
'<div class="padLeft40"><label>150</label> Total Capacity</div>'
+
'</div>'
+
'</div>'
;
});
innerLyOut
=
'<div class="col-md-6 layoutDivHead">'
+
'<div class="row padLeft15"><label>Pricing Details</label></div><hr class="hrClass">'
+
innerLyOut
+
'</div>'
+
'</div>'
+
'</div>'
;
layoutHtml
+=
'</div></div>'
;
layoutHtml
=
layoutHtml
+
innerLyOut
;
}
var
colSlot
=
(
layoutHtml
!=
''
)?
'6'
:
'12'
;
var
html
=
'<div id="map-canvas-assign" style="width: 100%; height: 200px;"></div><br>'
+
...
...
@@ -474,3 +487,10 @@ jQuery('[id="viewEventDetails"]').on('click',function(event) {
});
});
function
showLyDivDtls
(
thisObj
){
thisObj
.
next
(
"div"
).
removeClass
(
'hide'
);
setTimeout
(
function
(){
thisObj
.
next
(
"div"
).
addClass
(
'hide'
);
},
3000
);
}
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