Browse Source

poprzedni commit wszedl w kosmos?!

a.binder 7 years ago
parent
commit
1a2a5d7653
1 changed files with 189 additions and 16 deletions
  1. 189 16
      theme/view/top.php

+ 189 - 16
theme/view/top.php

@@ -8,19 +8,181 @@
 			<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="<?= $this->asset("assets/images/logout.png"); ?>" alt="Wyloguj" /> Wyloguj</a></li>
+					<li><div class="smad-desc">
+
+						<div class="btn-group">
+							<button id="ProcesMenuLoginDropdownLink" type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><?php echo User::getFullName(); ?> <span class="caret"></span></button>
+							<ul class="dropdown-menu pull-right smad-top-drop-down-menu" role="menu">
+																<li><a href="/webcal" target="_blank"><i class="glyphicon glyphicon-calendar"></i> Kalendarz</a></li>
+																		<li>
+											<a href="/webmail">
+												<form action="https://bravecom.yellowgroup.pl/webmail/loginFromSE.php" method="post" target="_blank">
+													<input type="hidden" name="_timezone" value="Europe/Berlin">
+													<input type="hidden" name="_token" value="">
+													<input type="hidden" name="_action" value="login">
+													<input type="hidden" name="_task" value="login">
+													<input type="hidden" name="_url" value="">
+													<input type="hidden" name="_user" value="diradmin">
+													<input type="hidden" name="_pass" value="CP6uSYikF/GWFeRPKFHYsA==">
+													<input type="hidden" name="EMAIL_IMAP_IMPORT_USERNAME" value="">
+													<input type="hidden" name="EMAIL_IMAP_IMPORT_HOST" value="">
+													<input type="hidden" name="EMAIL_IMAP_IMPORT_PASSWD_HASH" value="">
+													<input type="hidden" name="loginFromSE" value="1">
+													<!-- <input type="submit" class="btn" value="P"> -->
+													<button type="submit" class="btn btn-link" style="width:100%;padding:0;text-align:left;color:#333;"><i class="glyphicon glyphicon-envelope"></i> Poczta</button>
+												</form>
+											</a>
+										</li>
+																	<li><a href="/changepassword" target="_blank"><i class="glyphicon glyphicon-lock"></i> Zmień hasło</a></li>
+									<li><a href="/profilemanager" target="_blank"><i class="glyphicon glyphicon-user"></i> Apple Profile Manager</a></li>
+									<li class="divider"></li>
+
+								<li><a href="procesy5.php?task=USER" title="diradmin"><i class="glyphicon glyphicon-user"></i> Profil</a></li>
+								<li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=UrlAction_Calendar"><i class="glyphicon glyphicon-calendar"></i> Grafik pracy</a></li>
+								<li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=UserMsgs" title="Wiadomości systemowe"><i class="glyphicon glyphicon-envelope"></i> Wiadomości</a></li>
+								<li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Notify" title="Powiadomienia"><i class="glyphicon glyphicon-bell"></i> Powiadomienia</a></li>
+								<li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Users&amp;_task=reloadPerms" title="Przeładuj uprawnienia"><i class="glyphicon glyphicon-refresh"></i> Przeładuj uprawnienia</a></li>
+								<li class="divider"></li>
+								<li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=Status" title="Status systemu"><i class="glyphicon glyphicon-cog"></i> Status systemu</a></li>
+								<li><p class="text-muted" style="padding:3px 20px;"><nobr>Pokaż testy pracownika:</nobr></p>
+									<form action="<?php echo Request::getPathUri(); ?>index.php" method="POST">
+										<input type="hidden" name="FUNCTION_INIT" value="MENU_SELECT_PROCES">
+										<input type="hidden" name="_action" value="showMyTests">
+										<div class="typepsecial"><select id="ts-_user_id" placeholder="Szukaj..." name="_user_id" tabindex="-1" class="selectized" style="display: none;"><option value="" selected="selected"></option></select><div class="selectize-control single"><div class="selectize-input items not-full"><input type="text" autocomplete="off" tabindex="" placeholder="Szukaj..." style="width: 67px; opacity: 1; position: relative; left: 0px;"></div><div class="selectize-dropdown single" style="display: none;"><div class="selectize-dropdown-content"></div></div></div></div><script>
+						jQuery(document).ready(function(){
+							var fldNode=jQuery('#_user_id'), tsNode=jQuery('#ts-_user_id');
+							if (!fldNode && !tsNode) {
+								return;
+							}
+
+							fldNode.attr('name', '');
+							fldNode.hide();
+							if (fldNode.parent().hasClass('show-last-value')) {
+								fldNode.parent().hide();
+							}
+							tsNode.attr('name', '_user_id');
+							tsNode.attr('tabindex', fldNode.attr('tabindex'));
+
+
+							tsNode.selectize({
+								theme: 'typespecial',
+								valueField: 'id',
+								labelField: 'id',
+								searchField: 'name',
+								sortField: 'name',
+								create: false,
+								delimiter: ';',
+								dataAttr: 'typespecial',
+								preload: false,
+								options: null,
+								render: {
+									item: function(item, escape) {
+										//console.log('item', item);
+										//var name = formatName(item);
+										return '<div>' +
+											'<span class="name">' + escape(item.name || item.id) + '</span>' +
+										'</div>';
+									},
+									option: function(item, escape) {
+						//console.log('--- render.option item(',item,') this:',this);
+										return '<div>' +
+											'<span class="title">' +
+												escape(item.name || item.id) +
+											'</span>' +
+										'</div>';
+									}
+								},
+								onItemAdd: function(value, item) {// Invoked when an item is selected.
+									var curSel = this.options[value] || null, fieldExport;
+						//console.log('--- onItemAdd val(',value,'/',item.data('name'),'/',item,') this:curSel:',curSel);
+									if (curSel && curSel.exports) {
+										for (var i in curSel.exports) {
+											fieldExport = jQuery('#ts-f' + i);
+											if (fieldExport.length) {
+						//console.log('--- onItemAdd fieldExport.selectize(',fieldExport.selectize,')', fieldExport);
+												if (fieldExport.get(0).selectize) {
+													fieldExport.get(0).selectize.addOption({id:curSel.exports[i], name:curSel.exports[i]});
+													fieldExport.get(0).selectize.setValue(curSel.exports[i]);
+												} else {
+													//jQuery('#f' + i).val(curSel.exports[i]);
+												}
+											} else {
+						//console.log('--- onItemAdd jQuery(#f' + i + ').val(', curSel.exports[i], '): fieldExport.is(input:',fieldExport.is('input'),'/select:',fieldExport.is('select'),')', fieldExport);
+												fieldExport = jQuery('#f' + i);
+												if (fieldExport.is('input')) {
+													jQuery('#f' + i).val(curSel.exports[i]);
+												} else if (fieldExport.is('select')) {
+													//TODO: add option and select //jQuery('#f' + i).val(curSel.exports[i]);
+												}
+											}
+										}
+									}
+								},
+								score: function(search) {
+									var score = this.getScoreFunction(search);
+									return function(item) {
+										//console.log('score:item:', item, ', score:', score(item));
+										if (search && search == item.id) {
+											return 1;
+										} else {
+											return score(item);// score(item) * (1 + Math.min(item.watchers / 100, 1));
+										}
+									};
+								},
+								load: function(query, callback) {
+									if (!query.length) return callback();
+									$.ajax({
+										url: 'index.php?FUNCTION_INIT=PROCES_MENU&HEADER_NOT_INIT=YES&_task=TYPESPECIAL&fld=_user_id',
+										data: 'q=' + encodeURIComponent(query),
+										type: 'POST',
+										error: function() {
+											callback();
+										},
+										success: function(res) {
+											for (var i in res) {
+												if (!res[i].name || res[i].id != res[i].name) {
+													res[i].name = res[i].id + ': ' + res[i].name;
+												}
+											}
+											callback(res);
+										}
+									});
+								}
+							});
+
+						});
+		</script><input class="btn btn-xs btn-warning" type="submit" value="Wybierz">
+		<script>
+						jQuery(document).ready(function() {
+							jQuery('#ProcesMenuLoginDropdownLink')
+								.next('.dropdown-menu')
+								.find('.selectize-input')
+								.on('click', function(e) {
+									return false;
+								});
+							jQuery('#ProcesMenuLoginDropdownLink').on('click', function(e) {
+								setTimeout(function(){
+									jQuery('#ts-_user_id')
+										.next('.selectize-control')
+										.find('input:first')
+										.focus();
+								}, 200);
+							});
+						});
+											</script>
+										</form>
+									</li>
+									<li class="divider"></li>
+									<li><a href="<?php echo Request::getPathUri(); ?>index.php?LOGIN=LOGOUT"><i class="glyphicon glyphicon-off"></i> Wyloguj</a></li>
 				</ul>
 			</div>
-			<div class="smad-top-second">
-				<div id="hamburger-menu">
-					<a href="#" title="Menu" onClick="toggledisplay('smad-menu-main');">
-					<div class="hamburger-menu-line"></div>
-					<div class="hamburger-menu-line"></div>
-					<div class="hamburger-menu-line"></div>
-				</a>
+
+
+					</div></li>
+					<li> <span class="smad-line-grey">|</span>	<a href="<?php echo Request::getPathUri(); ?>index.php?LOGIN=LOGOUT" title="Wyloguj" class="smad-logout"><img src="<?= $this->asset("assets/images/logout.png"); ?>" alt="Wyloguj" /> Wyloguj</a></li>
+				</ul>
 				</div>
-				<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>
@@ -29,7 +191,6 @@
 			</div>
 		</div>
 	</div>
-</div>
 <!-- end:top -->
 <!-- start:menu -->
 <div id="smad-menu-main" class="container-fluid" style="display:none;">
@@ -41,7 +202,8 @@
                         <div class="smad-heder-title menu-item"><span class="smad-line-red">|</span> RAPORTY</div>
                         <div class="menu-item">
                             <ul>
-                                <li><a href="index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA" title="zobacz raporty" class="btn btn-success">zobacz raporty</a></li>
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA" title="zobacz raporty" class="btn btn-success">zobacz raporty</a></li>
+	                            <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_operational_raport_note/BI_audit_operational_raport_note" title="Baza zgłoszeń operacyjnych i notatek" class="btn btn-success">Operac. Baza zgł.</a></li>
                             </ul>
                         </div>
                     </div>
@@ -51,10 +213,21 @@
                         <div class="menu-item smad-heder-title"><span class="smad-line-red">|</span> BAZY DANYCH</div>
                         <div class="menu-item">
                             <ul>
-                                <li><a href="index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_KRS/BI_audit_KRS" title="KRS" class="btn btn-success">KRS</a></li>
-                                <li><a href="index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_CEIDG/BI_audit_CEIDG" title="CIDG" class="btn btn-success">CEIDG</a></li>
-                                <li><a href="index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_KONTRAHENCI" title="RUM" class="btn btn-success">RUM</a></li>
-                                <li><a href="#" title="KSIĘGOWOŚĆ" class="btn btn-success">KSIĘGOWOŚĆ</a></li>
+	                                                        
+	                            
+	                            
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_KRS/BI_audit_KRS" title="KRS - Firmy" class="btn btn-success">KRS/f</a></li>
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_KRS_person/BI_audit_KRS_person" title="KRS - Osoby" class="btn btn-success">KRS/p</a></li>
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_taxpayer/BI_audit_taxpayer" title="VAT - Aktywni płatnicy" class="btn btn-success">VATp</a></li>
+
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_CEIDG/BI_audit_CEIDG" title="CIDG" class="btn btn-success">CEIDG</a></li>
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_UMOWY/BI_audit_ENERGA_RUM_UMOWY" title="RUM Umowy" class="btn btn-success">RUM/u</a></li>
+                                
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_RUM_KONTRAHENCI/BI_audit_ENERGA_RUM_KONTRAHENCI" title="RUM Kontrahenci" class="btn btn-success">RUM/k</a></li>
+
+                                <li><a href="<?php echo Request::getPathUri(); ?>index.php?_route=ViewTableAjax&namespace=default_db/BI_audit_ENERGA_FAKTURY/BI_audit_ENERGA_FAKTURY" title="Faktury - do imoportowania" class="btn btn-success">Faktury(i)</a></li>
+                                
+                                <!--<li><a href="#" title="KSIĘGOWOŚĆ" class="btn btn-success">KSIĘGOWOŚĆ</a></li> -->
                             </ul>
                         </div>
                     </div>