diff --git a/app/libraries/Raspored.php b/app/libraries/Raspored.php index 583bf38..97b270b 100644 --- a/app/libraries/Raspored.php +++ b/app/libraries/Raspored.php @@ -30,8 +30,8 @@ class Raspored { * gets a raspored column with hours * @return string */ - public static function HoursColumn($widthPercent) { - $response = '
'; + public static function HoursColumn($left) { + $response = '
'; $response .= '
Vrijeme
'; for ($hour = \BaseController::START_HOUR; $hour < \BaseController::END_HOUR; $hour++) { $response .= '
'; - $response .= '
'; + $response = '
'; + $response .= self::HoursColumn(true); + $response .= '
'; $response .= '
'; - $response .= self::HoursColumn($widthPercent/2); foreach (self::RezervacijeForUserInWeek(\User::find($user_id), $week, $year) as $dayNumber => $blocks) { $response .= '
'; $response .= self::DayHeading($dayNumber, $blocks['formatedDate']); $response .= self::Blocks2HTML($blocks); $response .= self::DayHeading($dayNumber, $blocks['formatedDate']); $response .= '
'; - if ($dayNumber == 5) { - $response .= self::HoursColumn($widthPercent / 2); - } } $response .= '
'; - $response .= '
'; + $response .= self::HoursColumn(false); + $response .= '
'; return $response; } @@ -231,24 +229,22 @@ private static function RezervacijeForUcionicaInWeek($ucionicaId, $week, $year) * @return string */ public static function RasporedForUcionicaInWeek($ucionicaId, $week, $year) { - $count = 8; + $count = 7; $widthPercent = 100/$count; - $response = '
'; - $response .= '
'; + $response = '
'; + $response .= self::HoursColumn(true); + $response .= '
'; $response .= '
'; - $response .= self::HoursColumn($widthPercent/2); foreach (self::RezervacijeForUcionicaInWeek($ucionicaId, $week, $year) as $dayNumber => $blocks) { $response .= '
'; $response .= self::DayHeading($dayNumber, $blocks['formatedDate']); $response .= self::Blocks2HTML($blocks); $response .= self::DayHeading($dayNumber, $blocks['formatedDate']); $response .= '
'; - if ($dayNumber == 5) { - $response .= self::HoursColumn($widthPercent / 2); - } } $response .= '
'; - $response .= '
'; + $response .= self::HoursColumn(false); + $response .= '
'; return $response; } @@ -308,15 +304,16 @@ private static function RezervacijeForDay($day, $week, $year) { */ public static function RasporedForDay($day, $week, $year) { $rezervacije = self::RezervacijeForDay($day, $week, $year); - $count = count($rezervacije)+1; + $count = count($rezervacije); $widthPercent = 100/$count; - $response = '
'; + $response = '
'; $dto = new \DateTime(); $dto->setISODate($year, $week, $day); $response .= '

'.self::$dani[$day].', '.$dto->format('d.m.Y').'

'; - $response .= '
'; + $response .= '
'; + $response .= self::HoursColumn(true); + $response .= '
'; $response .= '
'; - $response .= self::HoursColumn($widthPercent/2); foreach ($rezervacije as $blocks) { $response .= '
'; if (isset($blocks['ucionica'])) { @@ -334,9 +331,9 @@ public static function RasporedForDay($day, $week, $year) { } $response .= '
'; } - $response .= self::HoursColumn($widthPercent/2); $response .= '
'; - $response .= '
'; + $response .= self::HoursColumn(false); + $response .= '
'; return $response; } diff --git a/app/storage/.gitignore b/app/storage/.gitignore old mode 100644 new mode 100755 diff --git a/app/storage/cache/.gitignore b/app/storage/cache/.gitignore old mode 100644 new mode 100755 diff --git a/app/storage/logs/.gitignore b/app/storage/logs/.gitignore old mode 100644 new mode 100755 diff --git a/app/storage/meta/.gitignore b/app/storage/meta/.gitignore old mode 100644 new mode 100755 diff --git a/app/storage/sessions/.gitignore b/app/storage/sessions/.gitignore old mode 100644 new mode 100755 diff --git a/app/storage/views/.gitignore b/app/storage/views/.gitignore old mode 100644 new mode 100755 diff --git a/app/views/Djelatnik/show.blade.php b/app/views/Djelatnik/show.blade.php index 7aa1941..f140337 100644 --- a/app/views/Djelatnik/show.blade.php +++ b/app/views/Djelatnik/show.blade.php @@ -1,7 +1,7 @@ @extends('layouts.master') @section('heading') -{{ HTML::style('css/raspored.css') }} +{{ HTML::style('css/raspored1.css') }} @endsection @section('title') diff --git a/app/views/Ucionica/show.blade.php b/app/views/Ucionica/show.blade.php index 26720c0..8ce3c7e 100644 --- a/app/views/Ucionica/show.blade.php +++ b/app/views/Ucionica/show.blade.php @@ -1,7 +1,7 @@ @extends('layouts.master') @section('heading') -{{ HTML::style('css/raspored.css') }} +{{ HTML::style('css/raspored1.css') }} @endsection @section('title') diff --git a/app/views/home.blade.php b/app/views/home.blade.php index af52a58..a74fc94 100644 --- a/app/views/home.blade.php +++ b/app/views/home.blade.php @@ -1,7 +1,7 @@ @extends('layouts.master') @section('heading') -{{ HTML::style('css/raspored.css') }} +{{ HTML::style('css/raspored1.css') }} @endsection @section('title') diff --git a/css/raspored.css b/css/raspored1.css similarity index 87% rename from css/raspored.css rename to css/raspored1.css index a310ddb..f67f7e1 100644 --- a/css/raspored.css +++ b/css/raspored1.css @@ -8,11 +8,13 @@ div.raspored > p { } div.raspored-scroller { - width: 100%; overflow-x: auto; + overflow-y: hidden; } div.raspored-scroller > div { width: 100%; + margin: 0; + padding: 0; overflow-x: visible; } div.raspored-scroller > div > div { @@ -20,6 +22,13 @@ div.raspored-scroller > div > div { margin: 0; } +div.raspored-time { + overflow: hidden; + padding: 0; + margin: 0; + text-align: center; +} + div.raspored-blocks{ position: relative; }