From 86758cfe5e100ccb956654b993c8d65cb79e56ab Mon Sep 17 00:00:00 2001 From: arzynik Date: Wed, 14 May 2014 11:12:18 -0700 Subject: [PATCH] partial #3073 --- .../cockpit2/api/drivershifts/index.php | 2 +- .../cockpit2/frontend/drivers-shifts.phtml | 39 +++-- .../default/cockpit2/layout/html.top.phtml | 1 + www/assets/cockpit/scss/cockpit.scss | 141 ++++++++++++++---- 4 files changed, 136 insertions(+), 47 deletions(-) diff --git a/include/controllers/default/cockpit2/api/drivershifts/index.php b/include/controllers/default/cockpit2/api/drivershifts/index.php index b0f453969..dbf38501d 100644 --- a/include/controllers/default/cockpit2/api/drivershifts/index.php +++ b/include/controllers/default/cockpit2/api/drivershifts/index.php @@ -21,7 +21,7 @@ class Controller_api_drivershifts extends Crunchbutton_Controller_RestAccount { if( $driver->id_admin == c::user()->id_admin ){ $mine = 1; } - $_drivers[] = [ 'name' => $driver->name, 'phone' => $driver->phone() ]; + $_drivers[] = [ 'name' => $driver->name, 'phone' => $driver->phone(), 'id' => $driver->id_admin]; } $export[] = Model::toModel( [ 'id_community_shift' => $shift->id_community_shift, diff --git a/include/views/default/cockpit2/frontend/drivers-shifts.phtml b/include/views/default/cockpit2/frontend/drivers-shifts.phtml index 0c540d681..135792cba 100644 --- a/include/views/default/cockpit2/frontend/drivers-shifts.phtml +++ b/include/views/default/cockpit2/frontend/drivers-shifts.phtml @@ -1,37 +1,44 @@
+

Shifts

-
+
+ +
-
+
-

{{shift.community}}

-

{{shift.date.day}}

-

{{shift.date.start_end}}

-

{{shift.date.timezone}}

- -
-
    -
  • - {{driver.name}} {{driver.phone | formatPhone}} -
  • -
+ {{shift.date.day}} + + +
+ + + + + + +
{{shift.date.start_end}}
+ {{driver.name}}
+ {{driver.phone | formatPhone}} +
-
-

No drivers

+
+ + +
No drivers
-
diff --git a/include/views/default/cockpit2/layout/html.top.phtml b/include/views/default/cockpit2/layout/html.top.phtml index 80a4863d2..dfa3544e6 100644 --- a/include/views/default/cockpit2/layout/html.top.phtml +++ b/include/views/default/cockpit2/layout/html.top.phtml @@ -25,6 +25,7 @@ + diff --git a/www/assets/cockpit/scss/cockpit.scss b/www/assets/cockpit/scss/cockpit.scss index 06dc95074..0296294b2 100644 --- a/www/assets/cockpit/scss/cockpit.scss +++ b/www/assets/cockpit/scss/cockpit.scss @@ -693,6 +693,100 @@ input { overflow: hidden; } + + + + +/* Driver shift page */ + +.drivers-shift .day { + font-weight: bold; +} + +.drivers-shift .box-content { + margin-top: .7em; + margin-bottom: 1em; + padding: .3em; +} +.drivers-shift .driver { + line-height: 1.2em; + font-size: 1.2em; +} +.drivers-shift .driver-phone { + +} +.drivers-shift .drivers { + width: 100%; +} +.drivers-shift .driver td { + padding: .3em .4em .3em .4em; +} +.drivers-shift .driver { + border-bottom: 1px solid #eee; +} +.drivers-shift .driver:last-child{ + border-bottom: none; +} +.drivers-shift .start-end { + white-space: nowrap; +} +.drivers-shift .start-end-brace { + width: 8em; +} +.drivers-shift .driver td.driver-spacer { + padding: .2px; + width: 1px; + overflow: hidden; +} +.drivers-shift .driver-spacer { + background: #f68275; +} +.drivers-shift .me .driver-spacer { + background: #4ecdc4; +} +.drivers-shift td.driver-details { + width: 100%; + padding-left: .7em; +} +.drivers-shift .me .driver-name { + font-weight: bold; +} + +.drivers-shift .me .driver-phone { + color: #4ecdc4; +} + + + +/* new stuff */ +.box-content.box-content-red { + background: #ff6b6b; + color: #fff; +} + +h1.title { + font-family: Source Sans Pro; + font-weight: 300; + font-size: 2.5em; + color: #5d5f63; + margin-bottom: 1.2em; + margin-top: .2em; +} +h1.title .fa { + font-size: .8em; + padding-right: .5em; + padding-top: .1em; + vertical-align: top; +} +.right { + float: right; +} +.left { + float: left; +} + + + /* drivers order list page */ .last-updated{ font-size: 1em; @@ -730,19 +824,7 @@ input { margin-bottom: 0.4em; } -.drivers-shifts-list .community{ - float: right; -} - .drivers-shifts-list .timezone{ - font-weight: normal; - text-align: right; - } - .drivers-shifts-list .drivers{ - margin: 1em 0 0 0; - } - .drivers-shifts-list .drivers li{ - line-height: 1.5em; - } + .box-filter{ margin: 0 0 1em 0; @@ -750,16 +832,19 @@ input { .box-filter .button{ display: table; float: left; - width: 8em; + width: 7em; margin-right: 1em; border: 2px solid transparent; - font-size: 1.2em; + font-size: 1.1em; } .box-filter .button.inactive{ border: 2px solid $orange; color: $orange; background: transparent; } + .box-filter .button:last-child { + margin-right: 0; + } /* todo:organize it --- order start */ .drivers-order{ @@ -1083,25 +1168,21 @@ body.loading .loader-wrap { } -/* generics */ -h1{ font-size: 2em;} -h2{ font-size: 1.5em;} -h3{ font-size: 1.17em;} -h4{ font-size: 1.17em;} -h5{ font-size: .83em;} -h6{ font-size: .75em;} -h1, h2, h3, h4, h5, h6 { font-weight: bolder } -p{ font-size: 1em; } -strong{ font-weight: bold; } + + +b, strong{ font-weight: bold; } .pointer{ cursor: pointer; } -.box-content{ - background: #FFF; - padding: 15px; +.box-content { + background: #fff; + padding: 10px; margin-bottom: 15px; - box-shadow: 0px 3px 2px #AAB2BD; +} + +.box-content.green { + background: #43b1a9; } .hide{ display: none; } @@ -1123,4 +1204,4 @@ strong{ font-weight: bold; } } .mfp-close { display: none !important; -} \ No newline at end of file +}