Selaa lähdekoodia

added BiAuditRaport - Bocian

Piotr Labudda 7 vuotta sitten
vanhempi
commit
1e3ee000d5

+ 367 - 0
SE/se-lib/Route/UrlAction/BiAuditRaport.php

@@ -0,0 +1,367 @@
+<?php
+
+Lib::loadClass('RouteBase');
+Lib::loadClass('UI');
+Lib::loadClass('Response');
+
+// index.php?_route=UrlAction_BiAuditRaport  - uruchamia defaultAction
+class Route_UrlAction_BiAuditRaport extends RouteBase {
+
+	public function defaultAction() {
+		UI::topSection();
+		UI::startContainer();
+
+		echo '<div class="container-bi_audit_raport"></div>';
+		try {
+
+			$items = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA')->buildQuery([
+				'cols' => [ // TODO:? propertyName = []
+					'ID',
+					'L_APPOITMENT_USER',
+					'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY',
+					'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI',
+					'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row',
+					'default_db__x3A__BI_audit_KW_requested_person:BI_audit_KW_requested_person',
+				]
+			])->getItems([
+				'limit' => 10
+			]);
+
+			DBG::nicePrint($items, '$items BiAudit');
+
+			UI::inlineJS(__FILE__ . '.view.js', [
+				'URL_FETCH_TEST' => $this->getLink('fetchEnergaRumKontrahenciPowiazaniaAjax'),
+				'URL_FETCH_TEST_KRS' => $this->getLink('fetchTestKrsAjax'),
+				'URL_FETCH_TEST_CEIDG' => $this->getLink('fetchTestCeidgAjax'),
+				'URL_FETCH_PRACOWNICY' => $this->getLink('fetchPracownicyAjax'),
+				'DBG' => V::get('DBG', 0, $_GET),
+			]);
+
+
+			throw new Exception("TODO...");
+
+		} catch (Exception $e) {
+			DBG::log($e);
+			UI::alert('danger', $e->getMessage());
+		}
+		UI::endContainer();
+		UI::footerSection();
+	}
+
+	public function fetchEnergaRumKontrahenciPowiazaniaAjaxAction() {
+		Response::sendTryCatchJson(array($this, 'fetchEnergaRumKontrahenciPowiazaniaAjax')); // , $args = 'JSON_FROM_REQUEST_BODY');
+	}
+	public function fetchEnergaRumKontrahenciPowiazaniaAjax($args) {
+		$id = V::get('ID', 1, $_REQUEST, 'int');
+		$items = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA')->buildQuery([
+			'cols' => [ // TODO:? propertyName = []
+				'ID',
+				'A_ADM_COMPANY',
+				'L_APPOITMENT_USER',
+				'A_CLASSIFIED',
+				'A_STATUS',
+				'A_STATUS_INFO',
+				'BI_analiza_depth',
+				'BI_analiza_reloadCache',
+				'FILE_STATUS',
+				'FILE_STATUS_info',
+				'L_APPOITMENT_USER',
+				'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY',
+				'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI',
+				'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA_row',
+				'default_db__x3A__BI_audit_KW_requested_person:BI_audit_KW_requested_person',
+			],
+			//'f_ID' => $id,
+		])->getItems([
+			'limit' => 10
+		]);
+
+		// $items = [
+		// 	[ 'ID' => 1, 'L_APPOITMENT_INFO' => 'x', 'BI_analiza_depth' => 'a', 'FILE_STATUS' => 1, 'FILE_STATUS_info' => 'test1'],
+		// 	[ 'ID' => 2, 'L_APPOITMENT_INFO' => 'y', 'BI_analiza_depth' => 'b', 'FILE_STATUS' => 0, 'FILE_STATUS_info' => 'test2'],
+		// 	[ 'ID' => 3, 'L_APPOITMENT_INFO' => 'z',  'BI_analiza_depth' => 'c', 'FILE_STATUS' => 1, 'FILE_STATUS_info' => 'test3'],
+		// ];
+
+		return [
+			'type' => 'success',
+			'msg' => 'OK',
+			'__req_args' => $_REQUEST,
+			'__args' => $args,
+			'body' => [
+				'items' => $items,
+				'view' => $this->showPowiazaniaEnergaRumKontrahenciPowiazania($items),
+			]
+		];
+	}
+
+
+public function showPowiazaniaEnergaRumKontrahenciPowiazania($items) {
+
+	$view = '<form class="form-horizontal" method="post">
+						<table class="table table-bordered table-hover table-striped" height=5>
+									 <thead>
+										 <tr style="text-align:center; background-color:lightgray">
+										 		<td width=1><input type="checkbox" name="checkAll" id="checkAll" /></td>
+											 <td width=1>ID</td>
+											 <td>Adnotacje</td>
+											 <td>Głębokość analizy</td>
+											 <td>Status raportu</td>
+											 <td>Status raportu - informacje</td>
+										 </tr>
+									 </thead>
+									 <tbody>
+					';
+
+		foreach ($items as $key => $row) {
+				$view .= '<tr>
+				<td><input type="checkbox" name="prID[]" value="'.$row['ID'].'" onClick="checkAll()"/></td>
+								<td align="right">'.$row["ID"].'</td>
+								<td align="right">'.$row["L_APPOITMENT_INFO"].'</td>
+								<td align="right">'.$row["BI_analiza_depth"].'</td>
+								<td align="right">'.$row["FILE_STATUS"].'</td>
+								<td align="right">'.$row["FILE_STATUS_info"].'</td>';
+		}
+		$view .= '</tbody></table></form>';
+
+
+		return $view;
+}
+
+
+
+
+
+	public function fetchTestKrsAjaxAction() {
+		Response::sendTryCatchJson(array($this, 'fetchTestKrsAjax')); // , $args = 'JSON_FROM_REQUEST_BODY');
+	}
+	public function fetchTestKrsAjax($args) {
+		$id = V::get('ID', 1, $_REQUEST, 'int');
+		$items = ACL::getAclByNamespace('default_db/BI_audit_KRS/BI_audit_KRS')->buildQuery([
+			'cols' => [ // TODO:? propertyName = []
+				'A_kod',
+				'A_kraj',
+				'A_miejscowosc',
+				'A_nrDomu',
+				'A_nrLokalu',
+				'A_poczta',
+				'A_ulica',
+				'ID',
+				'S_gmina',
+				'S_kraj',
+				'S_miejscowosc',
+				'S_powiat',
+				'S_wojewodztwo',
+				'dataDokumentu',
+				'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company/ID',
+				'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company/krs',
+				'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company/nazwa',
+				'default_db__x3A__BI_audit_KRS_company:BI_audit_KRS_company/regon',
+				'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person/ID',
+				'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person/imiona',
+				'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person/nazwisko',
+				'default_db__x3A__BI_audit_KRS_person:BI_audit_KRS_person/pesel',
+				'krs',
+				'nazwa',
+				'nip',
+				'regon',
+			],
+			'f_ID' => "{$id}",
+		])->getItems([
+			'limit' => 10
+		]);
+
+		return [
+			'type' => 'success',
+			'msg' => 'KRS',
+			'__req_args' => $_REQUEST,
+			'__args' => $args,
+			'body' => [
+				'items' => $items,
+			]
+		];
+	}
+
+	public function fetchTestCeidgAjaxAction() {
+		Response::sendTryCatchJson(array($this, 'fetchTestCeidgAjax')); // , $args = 'JSON_FROM_REQUEST_BODY');
+	}
+	public function fetchTestCeidgAjax($args) {
+		$id = V::get('ID', 0, $_REQUEST, 'int');
+		$items = ACL::getAclByNamespace('default_db/BI_audit_CEIDG/BI_audit_CEIDG')->buildQuery([
+			'cols' => [ // TODO:? propertyName = []
+				'ID',
+				'budynek',
+				'firma',
+				'gmina',
+				'identyfikatorWpisu',
+				'imie',
+				'kodPocztowy',
+				'kraj',
+				'lokal',
+				'miejscowosc',
+				'nazwisko',
+				'nip',
+				'poczta',
+				'powiat',
+				'regon',
+				'ulica',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/ID',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/budynek',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/gmina',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/kodPocztowy',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/lokal',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/miejscowosc',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/nazwa',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/nip',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/poczta',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/powiat',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/ulica',
+				'default_db__x3A__BI_audit_CEIDG_pelnomocnicy:BI_audit_CEIDG_pelnomocnicy/wojewodztwo',
+				'default_db__x3A__BI_audit_CEIDG_powiazania:BI_audit_CEIDG_powiazania/ID',
+				'default_db__x3A__BI_audit_CEIDG_powiazania:BI_audit_CEIDG_powiazania/nip',
+				'default_db__x3A__BI_audit_CEIDG_powiazania:BI_audit_CEIDG_powiazania/regon',
+			],
+			// 'f_ID' => $id,
+		])->getItems([
+			'limit' => 10
+		]);
+
+		return [
+			'type' => 'success',
+			'msg' => 'CEIDG',
+			'__req_args' => $_REQUEST,
+			'__args' => $args,
+			'body' => [
+				'items' => $items,
+			]
+		];
+	}
+
+
+
+	public function fetchPracownicyAjaxAction() {
+		Response::sendTryCatchJson(array($this, 'fetchPracownicyAjax'));
+	}
+
+	public function fetchPracownicyAjax($args) {
+		$id = V::get('ID', 1, $_REQUEST, 'int');
+		$items = ACL::getAclByNamespace('default_db/BI_audit_ENERGA_PRACOWNICY/BI_audit_ENERGA_PRACOWNICY')->buildQuery([
+			'cols' => [ // TODO:? propertyName = []
+				'ID',
+				'imiona',
+				'nazwisko',
+				'nip',
+				'pesel',
+				'regon',
+				'A_ADM_COMPANY',
+				'A_STATUS',
+				'default_db__x3A__BI_audit_ENERGA_PRACOWNICY_adresy:BI_audit_ENERGA_PRACOWNICY_adresy/*'
+			],
+			//'f_ID' => $id,
+		])->getItems([
+			'limit' => 10
+		]);
+
+		return [
+			'type' => 'success',
+			'msg' => 'showPracownicy',
+			'__req_args' => $_REQUEST,
+			'__args' => $args,
+			'body' => [
+				'items' => $items,
+				'view' => $this->showPracownicy($items),
+			]
+		];
+	}
+
+
+	public function showPracownicy($items) {
+	$view = '<form class="form-horizontal" method="post">
+						<table class="table table-bordered table-hover table-striped" height=5>
+									 <thead>
+										 <tr style="text-align:center; background-color:lightgray">
+										 		<td width=1><input type="checkbox" name="checkAll" id="checkAll" /></td>
+											 <td width=1>ID</td>
+											 <td>Imię/Imiona</td>
+											 <td>Nazwisko</td>
+											 <td>NIP</td>
+											 <td>Pesel</td>
+											 <td>Regon</td>
+											 <td>A_ADM_COMPANY</td>
+											 <td>A_STATUS</td>
+											 <td>Adresy</td>
+										 </tr>
+									 </thead>
+									 <tbody>
+					';
+
+		foreach ($items as $key => $row) {
+				$view .= '<tr>
+				<td><input type="checkbox" name="prID[]" value="'.$row['ID'].'" /></td>
+								<td align="right">'.$row["ID"].'</td>
+								<td align="right">'.$row["imiona"].'</td>
+								<td align="right">'.$row["nazwisko"].'</td>
+								<td align="right">'.$row["nip"].'</td>
+								<td align="right">'.$row["pesel"].'</td>
+								<td align="right">'.$row["regon"].'</td>
+								<td align="right">'.$row["A_ADM_COMPANY"].'</td>
+								<td align="right">'.$row["A_STATUS"].'</td>
+								<td align="right">'.$row["default_db__x3A__BI_audit_ENERGA_PRACOWNICY_adresy:BI_audit_ENERGA_PRACOWNICY_adresy"].'</td>
+
+								';
+		}
+		$view .= '</tbody></table></form>';
+
+		return $view;
+	}
+
+
+	// link do ackji w php: $saveFormUrl = $this->getLink('saveRaportAjax');
+	// przekazać link do JavaScript i tam:
+	// window.fetch('{$saveFormUrl}', { ... }).then(...) - dokumentacja: https://github.com/github/fetch
+	public function saveRaportAjaxAction() {
+		// Response::sendTryCatchJson(array($this, 'saveRaportAjax'), $args = 'JSON_FROM_REQUEST_BODY'); // użyj tej wersji jeśli chcesz wysyłać z przelgądarki JSON-a post-em
+		Response::sendTryCatchJson(array($this, 'saveRaportAjax'));
+	}
+	public function saveRaportAjax($args) {
+		// TODO: przejrzeć $args (jeśli JSON) lub $_POST
+		// Tworzenie rekrodu w bazie - Raport -
+		$idRaport = DB::getDB()->insert('BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA', [
+			'A_RECORD_CREATE_AUTHOR' => User::getLogin(),
+			'A_RECORD_CREATE_DATE' => 'NOW()',
+			// 'A_STATUS' => 'WAITING', // jeśli trzeba to ustawić
+
+		]);
+
+		// TODO: validate args ...
+		// throw new Exception("Wrong field..."); // lub inny komunikat błędu - spowoduje wysłanie json-a { 'msg' => 'Wrong field...', 'type' => 'error' }
+
+
+		// Tworzenie relacji Raport do Pracownicy
+		$pracownicyIds = []; // TODO: array z nr ID na podstawie wysłanego formularza
+		$refPowiazaniaToPracownicy = ACL::getRefTable('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA',
+			'default_db__x3A__BI_audit_ENERGA_PRACOWNICY:BI_audit_ENERGA_PRACOWNICY');
+		foreach ($pracownicyIds as $idPracownik) {
+			DB::getPDO()->insert($refPowiazaniaToPracownicy, ['PRIMARY_KEY' => $idRaport, 'REMOTE_PRIMARY_KEY' => $idPracownik]);
+		}
+
+
+		// Tworzenie relacji Raport do Kontrahenci - analogicznie jak wyżej
+		$kontrahenciIds = []; // TODO: array z nr ID na podstawie wysłanego formularza
+		$refPowiazaniaToKontrahenci = ACL::getRefTable('default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA',
+			'default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI:BI_audit_ENERGA_RUM_KONTRAHENCI');
+		foreach ($kontrahenciIds as $idKontrahent) {
+			DB::getPDO()->insert($refPowiazaniaToKontrahenci, ['PRIMARY_KEY' => $idRaport, 'REMOTE_PRIMARY_KEY' => $idKontrahent]);
+		}
+
+		// ...
+
+		return [
+			'msg' => "Utworzono raport",
+			'type' => "success",
+			'body' => [
+				'id' => $idRaport,
+			]
+		];
+	}
+
+}

+ 78 - 0
SE/se-lib/Route/UrlAction/BiAuditRaport.php.view.js

@@ -0,0 +1,78 @@
+console.log('test1... DBG:', DBG)
+
+if (!URL_FETCH_TEST) {
+	throw "Brak zmiennej URL_FETCH_TEST"
+}
+
+// Documentation: https://github.com/github/fetch
+fetch(URL_FETCH_TEST, {
+	credentials: 'same-origin'
+})
+.then(function parseJSON(response) {
+  return response.json()
+})
+.then(function(data) {
+	//$( ".container" ).append( data.body.view );
+	console.log('request succeeded with JSON response', data)
+}).catch(function(error) {
+	console.log('request failed', error)
+})
+
+fetch(URL_FETCH_TEST_KRS, {
+	credentials: 'same-origin'
+})
+.then(function parseJSON(response) {
+  return response.json()
+})
+.then(function(data) {
+	console.log('request succeeded with JSON response', data)
+}).catch(function(error) {
+	console.log('request failed', error)
+})
+
+fetch(URL_FETCH_TEST_CEIDG, {
+	credentials: 'same-origin'
+})
+.then(function parseJSON(response) {
+  return response.json()
+})
+.then(function(data) {
+	console.log('request succeeded with JSON response', data)
+}).catch(function(error) {
+	console.log('request failed', error)
+})
+
+
+fetch(URL_FETCH_PRACOWNICY, {
+	credentials: 'same-origin'
+})
+.then(function parseJSON(response) {
+  return response.json()
+})
+.then(function(data) {
+	$( ".container-bi_audit_raport" ).append( data.body.view );
+	console.log('request succeeded with JSON response', data)
+}).catch(function(error) {
+	console.log('request failed', error)
+})
+
+function checkAll() {
+	$('#checkAll').change(function(){
+		console.log('checkeddd');
+			var checkboxes = $('form').find(':checkbox');
+			if($(this).prop('checked')) {
+
+				checkboxes.prop('checked', true);
+			} else {
+
+				checkboxes.prop('checked', false);
+			}
+	});
+}
+
+$(document).ready(function(){
+
+	checkAll();
+});
+
+global.checkAll = checkAll;

+ 21 - 0
SE/se-lib/UI.php

@@ -16,6 +16,27 @@ class UI {
 		return $title;
 		return $title;
 	}
 	}
 
 
+public static function topSection() {
+	Lib::loadClass('S'); // todo: co to jest za klasa i czy jest wymagane dodanie klasy "S"
+	UI::loadTemplate('_layout_top_section');
+}
+
+
+public static function footerSection() {
+
+//todo: jeśli chciałbym przekazać parametr do widoku to musze go jakoś przekazać w klasie UI? Np. chciałbym przekazać wersje systemu
+/*		$version = (file_exists(APP_PATH_ROOT . '/VERSION'))? file_get_contents(APP_PATH_ROOT . '/VERSION') : null;
+		if ($version) {
+			echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">version: '.$version.'</div>';
+		}
+*/
+
+UI::loadTemplate('_layout_footer_section');
+}
+
+
+
+
 	public static function gora() {
 	public static function gora() {
 		UI::startHtml();
 		UI::startHtml();
 	}
 	}

+ 28 - 0
SE/se-lib/tmpl/_layout_footer_section.php

@@ -0,0 +1,28 @@
+</div>
+<!-- end:sm-wrapper -->
+
+<!-- start:footer -->
+<footer>
+   <div id="smad-footer-section" class="container-fluid padding-0">
+		 <div class="container">
+			 <div class="row">
+				  <div class="col-lg-12">
+						<ul class="menu-bottom">
+							<li><a href="#" title="O Bocianie">O Bocianie</a></li>
+							<li><a href="#" title="">Funkcje</a></li>
+							<li><a href="#" title="Bezpieczeństwo">Bezpieczeństwo</a></li>
+							<li><a href="#" title="">Kontakt</a></li>
+						</ul>
+					</div>
+				</div>
+			</div>
+		</div>
+	</footer>
+	<!-- end:footer -->
+	<!-- js -->
+	<?php
+		//todo: ujednolicic wczytanie themy widoków i css w jednym katalogu(obecnie css w katalogu static a widoki w katalogu tmp )
+		UI::inlineRawJS(APP_PATH_WWW . '/static/theme_bocian/assets/js/scripts.js');
+	 ?>
+</body>
+</html>

+ 92 - 0
SE/se-lib/tmpl/_layout_top_section.php

@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta charset="utf-8" />
+	<title><?php echo self::getTitle(); ?></title>
+	<link rel="shortcut icon" type="image/x-icon" href="./favicon.png?v=0.1">
+	<meta name="author" content="Piotr Labudda <piotrl86@gmail.com>" />
+	<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap.min.css" type="text/css" />
+	<meta name="robots" content="noindex, nofollow">
+
+<!--
+	<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap-theme.min.css" type="text/css" />
+-->
+	<link rel="stylesheet" href="stuff/jquery.selectize/css/selectize.bootstrap3.css" type="text/css" />
+	<link rel="stylesheet" href="stuff/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" type="text/css" />
+	<link rel="stylesheet" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css" type="text/css">
+	<!-- style css -->
+<?php
+	// todo: sprawdzić czy te poniższe style będa potrzebne
+	UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/main.css');
+	//todo: ujednolicic wczytanie themy widoków i css w jednym katalogu(obecnie css w katalogu static a widoki w katalogu tmp )
+	UI::inlineCSS(APP_PATH_WWW . '/static/theme_bocian/assets/css/styles.css');
+	UI::inlineRawJS(APP_PATH_WWW . '/static/object-assign-polyfill.js');
+	UI::inlineRawJS(APP_PATH_WWW . '/static/fetch-polyfill.min.js');
+	UI::inlineRawJS(APP_PATH_WWW . '/static/promise-polyfill.min.js');
+?>
+	<script src="stuff/jquery-2.1.0.min.js"></script>
+	<script src="stuff/jquery-plugins.js"></script>
+	<script src="stuff/jquery.form.js"></script>
+	<script src="stuff/jquery.autosize.min.js"></script>
+	<script src="stuff/bootstrap/js/bootstrap.min.js"></script>
+	<script src="stuff/jquery.selectize/js/standalone/selectize.min.js"></script>
+	<script src="stuff/numeral/numeral.min.js"></script>
+	<script src="stuff/moment/moment.min.js"></script>
+	<script src="stuff/moment/pl.js"></script>
+	<script src="stuff/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
+	<script src="stuff/notify.min.js"></script>
+	<script src="stuff/jquery-ui-1.10.4.custom.min.js"></script>
+	<script src="stuff/lodash.min.js?_v=4.6.1"></script>
+	<script src="stuff/superagent.js"></script>
+	<script src="stuff/validate.min.js"></script>
+	<?php S::printTimeoutUpdateJs(); ?>
+	<?php if (DBG::isActive()) : ?>
+		<script>
+			jQuery(document).on('DBG:notify', function(e, payload) {
+				console.log('DBG:notify', payload);
+			});
+		</script>
+	<?php endif; ?>
+<?php
+	UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/typespecial-fix.css');
+	UI::inlineJS(APP_PATH_WWW . '/static/p5UI/utils.js');
+	UI::inlineJS(APP_PATH_WWW . '/static/p5UI/clickedOutsideElement.js');
+	UI::inlineCSS(APP_PATH_WWW . '/static/p5UI/dropdown.css');
+	UI::inlineJS(APP_PATH_WWW . '/static/p5UI/dropdown.js');
+	UI::inlineJS(APP_PATH_WWW . '/static/p5UI/clickable.js'); // , [ 'DBG' => DBG::isActive() ]);
+	UI::inlineJS(APP_PATH_WWW . '/static/p5UI/ajax.js');
+	UI::inlineJS(APP_PATH_WWW . '/static/p5UI/legacy.js');
+	Lib::loadClass('Request');
+	UI::inlineJS(APP_PATH_WWW . '/static/p5WFS/GetFeature.js', [
+		'WFS_URL' => Request::getPathUri() . '/wfs-data.php/default_db/',
+	]);
+	UI::hButtonAjaxJsFunction();
+?>
+</head>
+<body>
+	<!-- start:sm-wrapper -->
+	<div id="smad-wrapper">
+		<!-- start:smad-header -->
+		<div id="smad-header-section" class="container-fluid">
+		    <div class="row">
+		        <div class="col-xs-12 col-sm-2 col-md-2 col-lg-1 brand-logo">
+		            <a href="/" title=""><img src="static/theme_bocian/assets/images/logo-bocian.png" alt="Bocian" /></a>
+		        </div>
+		        <div class="col-xs-12 col-sm-10 col-md-10 col-lg-11">
+		           <div class="smad-top-first">
+		                <ul>
+		                    <li><div class="smad-header-title">zalogowany jako:</div></li>
+		                    <li><div class="smad-desc">Jan Kowalski </div></li>
+		                    <li> <span class="smad-line-grey">|</span>  <a href="index.php?LOGIN=LOGOUT" title="Wyloguj" class="smad-logout"><img src="static/theme_bocian/assets/images/logoout.png" alt="Wyloguj" /> Wyloguj</a></li>
+		                </ul>
+		           </div>
+		           <div class="smad-top-second">
+		               <ul>
+		                   <li><div class="smad-header-title">koniec sesji za:</div></li>
+		                   <li><div class="smad-desc"><code id="session-timer" style="padding:2px 5px;font-weight:normal;color:#000;" title="Czas sesji">52:40</code></div></li>
+		               </ul>
+		           </div>
+		        </div>
+		    </div>
+ 		</div>
+		<!-- end:smad-header -->

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
SE/static/theme_bocian/assets/css/styles.css


BIN
SE/static/theme_bocian/assets/images/button-red.png


BIN
SE/static/theme_bocian/assets/images/logo-bocian.png


BIN
SE/static/theme_bocian/assets/images/logout.png


+ 0 - 0
SE/static/theme_bocian/assets/js/scripts.js


+ 289 - 0
SE/static/theme_bocian/assets/less/styles.less

@@ -0,0 +1,289 @@
+// Variables, Mixins
+@import "variables.less";
+
+// html5
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section,
+summary {
+  display: block;
+}
+
+/* MIX */
+body {
+  margin: 0 0;
+  font-family: @font-primary;
+  font-size: 17px;
+  line-height: 27px;
+  color: @brand-text;
+}
+
+p, ul, li {
+  font-size: 17px;
+  text-align: justify;
+}
+strong {
+  color: @brand-primary;
+}
+
+.font-weight-700 {
+  font-weight: 700;
+}
+.padding-0 {
+  padding: 0;
+}
+.padding-lr-0 {
+  padding-left: 0;
+  padding-right: 0;
+}
+.padding-bottom-25 {
+  padding-bottom: 25px;
+}
+.pl-20 {
+  padding-left: 20px;
+}
+.smad-line-grey {
+  color: @brand-grey;
+}
+.smad-line-red {
+  color: @brand-primary;
+}
+
+.btn {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  padding-left: 15px;
+  padding-right: 15px;
+}
+.border-top-grey {
+  border-top: 2px solid @brand-grey;
+}
+.border-bottom-grey {
+  border-bottom: 2px solid @brand-grey;
+}
+
+/** Bootstrap */
+.btn-primary {
+  color: @brand-text;
+  background-color: @brand-grey;
+  border-color: @brand-grey;
+}
+.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover, .open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus, .open>.dropdown-toggle.btn-primary:hover {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+.btn-primary.active, .btn-primary:active, .btn-primary:hover, .open>.dropdown-toggle.btn-primary {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+.btn-default {
+  color: @brand-primary;
+  background-color: @brand-white;
+  border-color: @brand-primary;
+}
+
+.btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus, .btn-default:active:focus, .btn-default:active:hover, .open>.dropdown-toggle.btn-default.focus, .open>.dropdown-toggle.btn-default:focus, .open>.dropdown-toggle.btn-default:hover {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+.btn-default.active, .btn-default:active, .btn-default:hover, .open>.dropdown-toggle.btn-default {
+  color: @brand-white;
+  background-color: @brand-primary;
+  border-color: @brand-primary;
+}
+
+/** TOP */
+#smad-header-section {
+  padding: 10px 10px;
+  background-color: @brand-grey-light;
+
+  .smad-top-first {
+    padding-top: 20px;
+    border-bottom: 1px solid @brand-primary;
+  }
+
+  .smad-top-second {
+    text-align: right;
+  }
+
+  ul {
+    text-align: right;
+    list-style-type: none;
+
+    li {
+      padding: 0px;
+      display: inline-block;
+
+      .smad-header-title {
+        color: @brand-text-light;
+        font-size: 13px;
+      }
+      .smad-desc {
+        padding-right: 10px;
+        color: @brand-text;
+        font-size: 13px;
+      }
+
+    }
+  }
+
+  a.smad-logout {
+    color: @brand-text;
+    font-size: 14px;
+    text-decoration: none;
+
+    &:focus, &:hover {
+      color: @brand-text;
+      text-decoration: none;
+    }
+  }
+}
+
+/** Menu */
+#smad-menu-section {
+
+
+  .smad-heder-title {
+    color: @brand-text;
+    font-weight: 700;
+  }
+
+  .menu-items {
+    padding-top: 35px;
+    padding-bottom: 20px;
+
+    .menu-item {
+      display: inline-block;
+    }
+    ul {
+      list-style-type: none;
+      display: inline-block;
+
+      li {
+        padding: 0 10px;
+        display: inline-block;
+      }
+    }
+  }
+
+}
+
+
+/* Menu form */
+#smad-menu-form-section {
+
+  .smad-border-col {
+    border-right: 2px solid @brand-grey;
+
+    @media screen and (max-width : @screen-md ) {
+      border-right: 0;
+      border-bottom: 2px solid @brand-grey;
+    }
+  }
+
+  .menu-items {
+    padding-top: 45px;
+    padding-bottom: 20px;
+
+    .menu-item {
+      padding-top: 25px;
+      padding-bottom: 65px;
+      display: inline-block;
+
+      a {
+        color: @brand-text;
+        text-decoration: none;
+        font-weight: 700;
+
+        &:focus, &:hover {
+          color: @brand-text;
+          text-decoration: none;
+          font-weight: 700;
+        }
+      }
+
+      input {
+        width: 80px;
+      }
+    }
+  }
+
+  .menu-form-input {
+    padding-top: 25px;
+    padding-bottom: 25px;
+
+    .menu-item {
+
+      display: inline-block;
+
+      a {
+        color: @brand-text;
+        text-decoration: none;
+        font-weight: 700;
+
+        &:focus, &:hover {
+          color: @brand-text;
+          text-decoration: none;
+          font-weight: 700;
+        }
+      }
+
+      input {
+        width: 80px;
+      }
+    }
+  }
+
+}
+
+#smad-generate-link {
+  padding: 60px 60px;
+}
+
+/** Footer */
+#smad-footer-section{
+  padding: 28px 0 10px 0;
+  background-color: @brand-secondary;
+  text-align: center;
+
+  ul {
+    text-align: center;
+    list-style-type: none;
+
+    li {
+      padding: 0 30px;
+      display: inline-block;
+
+      @media screen and (max-width : @screen-md ) {
+        padding: 0 10px;
+      }
+      @media screen and (max-width : @screen-xs ) {
+        text-align: center;
+        padding: 0 10px;
+        display: block;
+      }
+
+      a {
+        text-decoration: none;
+        color: @brand-text;
+        text-decoration: none;
+
+        &:focus, &:hover {
+          color: @brand-text;
+          text-decoration: underline;
+        }
+      }
+    }
+  }
+}

+ 52 - 0
SE/static/theme_bocian/assets/less/variables.less

@@ -0,0 +1,52 @@
+// Google Fonts
+@import url("https://fonts.googleapis.com/css?family=Roboto:400,500,500i,700");
+
+@font-primary: 'Roboto', sans-serif;
+
+@brand-primary: #d7142d;
+@brand-secondary: #cdcccc;
+
+@brand-white: #fff;
+@brand-grey: @brand-secondary;
+@brand-grey-light: #f6f6f6;
+@brand-dark: #000000;
+
+@brand-error: #ff8585;
+@brand-success: #69b705;
+@brand-link: @brand-secondary;
+@brand-link-active: @brand-primary;
+@brand-link-text: @brand-dark;
+@brand-link-text-active: @brand-white;
+@brand-text: @brand-dark;
+@brand-text-light: #cccccc;
+
+
+// Extra small screen / phone
+//** Deprecated `@screen-xs` as of v3.0.1
+@screen-xs:                  480px;
+@screen-xxs:                  415px;
+//** Deprecated `@screen-xs-min` as of v3.2.0
+@screen-xs-min:              @screen-xs;
+//** Deprecated `@screen-phone` as of v3.0.1
+@screen-phone:               @screen-xs-min;
+
+// Small screen / tablet
+//** Deprecated `@screen-sm` as of v3.0.1
+@screen-sm:                  768px;
+@screen-sm-min:              @screen-sm;
+//** Deprecated `@screen-tablet` as of v3.0.1
+@screen-tablet:              @screen-sm-min;
+
+// Medium screen / desktop
+//** Deprecated `@screen-md` as of v3.0.1
+@screen-md:                  992px;
+@screen-md-min:              @screen-md;
+//** Deprecated `@screen-desktop` as of v3.0.1
+@screen-desktop:             @screen-md-min;
+
+// Large screen / wide desktop
+//** Deprecated `@screen-lg` as of v3.0.1
+@screen-lg:                  1200px;
+@screen-lg-min:              @screen-lg;
+//** Deprecated `@screen-lg-desktop` as of v3.0.1
+@screen-lg-desktop:          @screen-lg-min;

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä