This commit is contained in:
urospodkriznik 2022-10-04 12:46:44 +02:00
commit 36cbb8fd03
4 changed files with 2115 additions and 1948 deletions

View File

@ -8,10 +8,35 @@
class SurveyListFolders {
private $current_folder = 0; // Trenutni odprt folder
private $folders_list = array(); // Seznam vseh folderjev uporabnika
private $pageno = 1; // Trenutna stran (paginacija)
public function __construct() {
global $admin_type, $global_user_id, $site_path;
$sql = sisplet_query("SELECT f.*, COUNT(a.ank_id) AS survey_count
FROM srv_mysurvey_folder f
LEFT JOIN srv_mysurvey_anketa a
ON f.id=a.folder
WHERE f.usr_id='".$global_user_id."'
GROUP BY 1
ORDER BY f.naslov ASC
");
if (!$sql) {
echo mysqli_error($GLOBALS['connect_db']);
}
while($row = mysqli_fetch_array($sql)){
$this->folders_list[$row['id']] = $row;
// Nastavimo, ce je to trenutno odprt folder
if($row['active'] == '1')
$this->current_folder = $row['id'];
}
}
@ -20,44 +45,96 @@ class SurveyListFolders {
global $global_user_id;
global $lang;
echo '<div class="survey_list_folders">';
// Levi meni s folderji
echo ' <div class="left_menu">';
echo ' <div class="left_content">';
$this->displayLeftContent();
echo ' </div>';
// Desna vsebina
echo ' <div class="right_content">';
$this->displayRightContent();
echo ' </div>';
// Gumb za ustvarjanje ankete
echo '<div class="first_line">';
$this->new_anketa_div();
echo '</div>';
}
// Izpisemo levo stran - seznam folderjev
private function displayLeftContent(){
echo '<div class="title">Vaše mape</div>';
// Izpisemo seznam folder s seznamom childov v rootu
$this->displayFolderList(0);
}
// Izpisemo seznam folderjev za posameznega parenta
private function displayFolderList($folder_id){
$this->displayFolder();
echo '<ul class="folder_list">';
echo '</ul>';
}
// Izpisemo posamezen folder
private function displayFolder(){
echo '<div class="folder_item">';
echo '</div>';
}
// Izpisemo desnostran - vsebino odprtega folderja
private function displayRightContent(){
// Naslov trenutnega folderja
echo ' <div class="folder_title">';
$this->displayFolderTitle();
echo ' </div>';
// Vrstica z gumbi, filtri
echo ' <div class="second_line">';
$this->displayButtonsRow();
echo ' </div>';
// Izris seznama anket
echo '<div class="div_sl_new folders">';
$this->displaySurveyTable();
echo '</div>';
// Footer
echo '<footer id="srv_footer" class="folders_footer">';
$this->displayFooter();
echo '</footer>';
}
// Druga vrstica - filtri in iskanje
echo '<div class="second_line '.($this->isSearch == 1 ? 'advanced_search' : '').'">';
// Naslov folderja na vrhu
private function displayFolderTitle(){
}
// Izpisemo vrstico z gombi na vrhu (ustvari novo anketo, filtri...)
private function displayButtonsRow(){
// Gumb za ustvarjanje ankete
$this->new_anketa_div();
// Filtri na desni
echo ' <div class="filters">';
// Okno za search po mojeih anketah
echo ' <div id="searchMySurveys">';
$this->displaySearch();
echo ' </div>';
// Paginacija
echo ' <div class="pagination top">';
$this->displayPagiantion();
echo ' </div>';
// Filtri na desni
echo ' <div class="filters">';
// Preklop na pogled s folderji (samo ce imamo nov vmesnik)
//echo '<div id="folderSwitch">';
$this->displayFolderSwitch();
@ -74,12 +151,163 @@ class SurveyListFolders {
echo ' </div>';
echo ' </div>';
}
// Kreacija nove ankete
private function new_anketa_div(){
global $lang;
global $admin_type;
global $site_url;
echo '<a href="'.$site_url.'admin/survey/index.php?a=ustvari_anketo" title="'.$lang['srv_create_survey'].'">';
echo ' <button class="large blue button_create">';
echo $lang['srv_create_survey'];
echo ' </button>';
echo '</a>';
// uporabniki z vklopljeno moznostjo imajo tudi hitro ustvarjanje ankete (brez vnosa imena in izbire skina)
$oneclickCreateMySurveys = UserSetting::getInstance()->getUserSetting('oneclickCreateMySurveys');
if ($oneclickCreateMySurveys == 1) {
echo '<div class="button_quick_create">';
echo ' <a href="#" onclick="newAnketaBlank();" title="'.$lang['one_click_create'].'">';
echo ' <span class="faicon add"></span><span>'.$lang['one_click_create'].'</span>';
echo ' </a>';
echo '</div>';
}
}
// Prikazemo preklop med navadnim pogledom in pogledom s folderji
private function displayFolderSwitch(){
global $lang, $global_user_id;
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
// Ce ni na voljo
if(!$userAccess->checkUserAccess('my_survey_folders')){
echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" class="user_access_locked" onClick="popupUserAccess(\'my_survey_folders\');">';
echo $lang['srv_mySurvey_show_folders'];
echo '</div>';
}
else{
echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" onClick="switchFolder(\''.$this->show_folders.'\');">';
echo ' <span>'.$lang['srv_mySurvey_show_folders'].'</span>';
// Stikalo za folderje
if($this->show_folders == 1)
echo ' <div class="switch_folders on"></div>';
else
echo ' <div class="switch_folders off"></div>';
echo '</div>';
}
}
// Prikazemo gumb za sortiranje seznama anket
private function displaySortButton(){
global $lang, $site_url;
echo $lang['orderby'];
echo '<div id="sortSettings">';
echo '<ul>';
if($this->sorttype == 2){
$sort = 1;
$img_src = 'sort_ascending';
}
else{
$sort = 2;
$img_src = 'sort_descending';
}
echo '<li '.($this->sortby == 1 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'1\',\''.($this->sortby != 1 ? '1' : $sort).'\')">'.$lang['sort_by_title'].' <span class="faicon '.($this->sortby != 1 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 6 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'6\',\''.($this->sortby != 6 ? '1' : $sort).'\')">'.$lang['sort_by_qcount'].' <span class="faicon '.($this->sortby != 6 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 5 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'5\',\''.($this->sortby != 5 ? '1' : $sort).'\')">'.$lang['sort_by_answercount'].' <span class="faicon '.($this->sortby != 5 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 16 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'16\',\''.($this->sortby != 16 ? '1' : $sort).'\')">'.$lang['sort_by_insert'].' <span class="faicon '.($this->sortby != 16 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 14 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'14\',\''.($this->sortby != 14 ? '1' : $sort).'\')">'.$lang['sort_by_edit'].' <span class="faicon '.($this->sortby != 14 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 18 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'18\',\''.($this->sortby != 18 ? '1' : $sort).'\')">Status <span class="faicon '.($this->sortby != 18 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 7 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'7\',\''.($this->sortby != 7 ? '1' : $sort).'\')"><li '.($this->sortby == 7 ? ' class="active"' : '').'>'.$lang['sort_by_author'].' <span class="faicon '.($this->sortby != 7 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 11 ? ' class="active"' : '').' style="border:0;"><a href="#" onClick="surveyList_goTo(\'11\',\''.($this->sortby != 11 ? '1' : $sort).'\')">'.$lang['sort_by_editor'].' <span class="faicon '.($this->sortby != 11 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '</ul>';
echo '</div>';
}
// Prikazemo gumb za filtriranje seznama anket
private function displayFilterButton(){
global $lang, $site_url, $admin_languages;
echo '<div id="filterButton" '.(($this->user_id || $this->lang_id != 0 || $this->gdpr != 0) ? 'class="active"' : '').'>';
echo $lang['srv_analiza_filter'];
echo '<div id="filterSettings">';
echo '<ul>';
# filter po uporabniku
echo '<li>';
echo '<span class="filter_title">'.$lang['srv_list_author'].'</span>';
// Ce preklapljamo v searchu moramo refreshati celo stran (druga js funkcija)
$reload = ($this->isSearch == 1) ? '_reload' : '';
echo '<span class="filter_line"><input type="radio" name="filter_mySurveys" id="filter_mySurveys_0" value="0" '.(!$this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'clr\',\'0\');"> <label for="filter_mySurveys_0">'.$lang['srv_list_all_surveys'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_mySurveys" id="filter_mySurveys_1" value="1" '.($this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'uid\',\''.$this->g_uid.'\');"> <label for="filter_mySurveys_1">'.$lang['srv_list_my_surveys'].'</label></span>';
echo '</li>';
// Izris seznama anket
echo '<div class="div_sl_new folders">';
# filter po jeziku
echo '<li>';
echo '<span class="filter_title">'.$lang['srv_sl_set_language'].'</span>';
echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_0" value="0" '.((int)$this->lang_id == 0 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'0\');"> <label for="filter_language_0">'.$lang['srv_sl_set_language_all'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_1" value="1" '.((int)$this->lang_id == 1 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'1\');"> <label for="filter_language_1">'.$admin_languages['1'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_2" value="2" '.((int)$this->lang_id == 2 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'2\');"> <label for="filter_language_2">'.$admin_languages['2'].'</label></span>';
echo '</li>';
# filter po GDPR anketah
echo '<li>';
echo '<span class="filter_title">'.$lang['srv_gdpr'].'</span>';
echo '<span class="filter_line"><input type="radio" name="filter_gdpr" id="filter_gdpr_0" value="0" '.((int)$this->gdpr == 0 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'0\');"> <label for="filter_gdpr_0">'.$lang['srv_list_all_surveys'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_gdpr" id="filter_gdpr_1" value="1" '.((int)$this->gdpr == 1 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'1\');"> <label for="filter_gdpr_1">'.$lang['srv_list_gdpr_gdpr'].'</label></span>';
echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
}
// Prikazemo search okno za iskanje po anketah
public function displaySearch(){
global $lang;
global $site_url;
echo '<form method="GET" id="1kasmysurvey" action="'.$site_url.'admin/survey/index.php">';
echo '<input id="searchMySurvey" type="text" value="" placeholder="'.$lang['s_search_mySurvey'].'" name="search" />';
echo ' <button class="medium white-black" onclick="$(\'#1kasmysurvey\').submit(); return false;">';
echo $lang['s_search2'];
echo ' </button>';
echo '</form>';
}
// Izpisemo tabelo z anketami v folderju
private function displaySurveyTable(){
// Loop po vseh folderjih prvega nivoja - samo na prvi strani
if($this->pageno == 1){
@ -107,9 +335,6 @@ class SurveyListFolders {
echo '<script type="text/javascript">surveyList_folder_init();</script>';
echo '</div>';
// Klik izven "Vec" - zapremo okno
echo '<script>
$(document).mouseup(function(e){
@ -121,49 +346,20 @@ class SurveyListFolders {
});
</script>';
echo ' </div>';
echo '</div>';
}
/** Kreacija nove ankete
*/
function new_anketa_div(){
global $lang;
global $admin_type;
global $site_url;
echo '<a href="'.$site_url.'admin/survey/index.php?a=ustvari_anketo" title="'.$lang['srv_create_survey'].'">';
echo ' <button class="large blue button_create">';
echo $lang['srv_create_survey'];
echo ' </button>';
echo '</a>';
// uporabniki z vklopljeno moznostjo imajo tudi hitro ustvarjanje ankete (brez vnosa imena in izbire skina)
$oneclickCreateMySurveys = UserSetting::getInstance()->getUserSetting('oneclickCreateMySurveys');
if ($oneclickCreateMySurveys == 1) {
echo '<div class="button_quick_create">';
echo ' <a href="#" onclick="newAnketaBlank();" title="'.$lang['one_click_create'].'">';
echo ' <span class="faicon add"></span><span>'.$lang['one_click_create'].'</span>';
echo ' </a>';
echo '</div>';
}
}
function displayNewSurveyList($folder=0) {
global $lang;
global $site_url;
global $global_user_id;
if (SRV_LIST_GET_AS_LIST == true) {
$ankete = $this->getSurveysAsListNew($folder);
$ankete = $this->getSurveysAsListNew($this->current_folder);
echo '<input type="hidden" id="sortby" value="'.(isset($_POST['sortby']) ? $_POST['sortby'] : null).'">';
echo '<input type="hidden" id="sorttype" value="'.(isset($_POST['sorttype']) ? $_POST['sorttype'] : null).'">';
if ($count = count($ankete)) {
if ($count = count($this->surveys_list)) {
// Naslov za search
if($this->isSearch == 1){
@ -225,28 +421,11 @@ class SurveyListFolders {
// VRSTICE Z ANKETAMI
foreach ( $ankete as $anketa ) {
foreach ($this->surveys_list as $anketa) {
echo '<tr id="anketa_list_'.$anketa['id'].'" class="anketa_list '.($this->show_folders == 1 ? ' mySurvey_draggable' : '').'" anketa_id="'.$anketa['id'].'">';
// Aktivnost - neaktivna, aktivna, zakljucena
/*echo '<td class="col2">';
if ($anketa['active'] == 1) {
echo '<div class="dot blue" title="'.$lang['srv_anketa_active2'].'"></div>';
} else {
$sqlA = sisplet_query("SELECT sid FROM srv_activity WHERE sid='".$anketa['id']."'");
if (mysqli_num_rows($sqlA) > 0) {
# anketa je zaključena
echo '<div class="dot grey" title="'.$lang['srv_survey_non_active'].'"></div>';
} else {
# anketa je neaktivna
echo '<div class="dot grey" title="'.$lang['srv_survey_non_active_notActivated'].'"></div>';
}
}
echo '</td>';*/
// Naslov
echo '<td class="col1">';
@ -464,8 +643,106 @@ class SurveyListFolders {
if($this->isSearch == 1)
echo '<span class="search_title">'.$lang['s_search_mySurvey_nothing'].'.</span>';
}
}
// Izpisemo footer
private function displayFooter(){
global $lang;
global $site_frontend;
global $mysql_database_name;
// Leva stran footerja
echo '<div class="footer_left">';
// Custom footer
if(AppSettings::getInstance()->getSetting('app_settings-footer_custom') !== false){
echo '<div class="footer_line">';
echo AppSettings::getInstance()->getSetting('app_settings-footer_text');
echo '</div>';
}
// Default footer
else{
// First left line - links
echo '<div class="footer_line">';
echo $lang['srv_footer_links'];
if(isAAI())
echo '<span class="footer_item"><a href="https://www.1ka.si/d/sl/pomoc/pogosta-vprasanja/pogosta-vprasanja-o-arnes-aai-prijavi-uporabi-orodja-1ka" target="_blank">'.$lang['aa4'].'</a></span>';
echo '</div>';
// Second left line - version...
echo '<div class="footer_line">';
// Verzijo izpišemo samo za admine
if ($admin_type == 0) {
// Verzija 1ka
$sqlVersion = sisplet_query("SELECT value FROM misc WHERE what='version'", "obj");
if (!empty($sqlVersion)) {
echo '<span class="footer_item">'.$lang['srv_footer_1ka_version'].': ' . $sqlVersion->value . '</span>';
}
// Verzija Drupal
if ($site_frontend == 'drupal') {
$sqlDrupal = sisplet_query("SELECT value FROM misc WHERE what='drupal version'", "obj");
if (!empty($sqlDrupal)) {
echo '<span class="footer_item">Drupal: ' . $sqlDrupal->value . '</span>';
}
}
}
echo '<span class="footer_item">Copyright (©) 2002-'.date('Y').' '.$lang['srv_footer_copyright'].'</span>';
echo '</div>';
}
echo '</div>';
// Desna stran footerja - report a bug
echo '<div id="reportabug" class="footer_right">';
// www.1ka.si ima se link na go instrukcije
if($mysql_database_name == 'real1kasi' || $mysql_database_name == 'test1kasi' || $mysql_database_name == 'test21kasi'){
echo '<a href="#" onClick="consultingPopupOpen();"><span class="faicon external_link"></span> '.$lang['srv_svetovanje'].'</a>';
echo '<br>';
}
// Posebej report buga za gorenje
if (Common::checkModule('gorenje')){
echo '<a href="https://helpdesk.gorenje.com/SubmitSR.jsp" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
}
else{
// Slovenski jezik
if ($lang['id'] == 1){
echo '<a href="https://www.1ka.si/a/72864?Q1=292032" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
// Zacasen gumb na desni
echo '<a href="https://www.1ka.si/a/72864?Q1=292032" target="_blank"><div class="right_help_button">'.$lang['srv_footer_reportabug2'].'</div></a>';
}
// Angleski jezik
else{
echo '<a href="https://www.1ka.si/a/72864?Q1=292032&language=2" target="_blank"><span class="faicon inline_comment"></span> '.$lang['srv_footer_reportabug'].'</a>';
// Zacasen gumb na desni
echo '<a href="https://www.1ka.si/a/72864?Q1=292032&language=2" target="_blank"><div class="right_help_button">'.$lang['srv_footer_reportabug2'].'</div></a>';
}
}
echo '</div>';
}
function displayNewFolder($folder){
global $lang;
@ -611,119 +888,9 @@ class SurveyListFolders {
}
}
// Prikazemo gumb za sortiranje seznama anket
private function displaySortButton(){
global $lang, $site_url;
echo $lang['orderby'];
echo '<div id="sortSettings">';
echo '<ul>';
if($this->sorttype == 2){
$sort = 1;
$img_src = 'sort_ascending';
}
else{
$sort = 2;
$img_src = 'sort_descending';
}
echo '<li '.($this->sortby == 1 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'1\',\''.($this->sortby != 1 ? '1' : $sort).'\')">'.$lang['sort_by_title'].' <span class="faicon '.($this->sortby != 1 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 6 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'6\',\''.($this->sortby != 6 ? '1' : $sort).'\')">'.$lang['sort_by_qcount'].' <span class="faicon '.($this->sortby != 6 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 5 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'5\',\''.($this->sortby != 5 ? '1' : $sort).'\')">'.$lang['sort_by_answercount'].' <span class="faicon '.($this->sortby != 5 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 16 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'16\',\''.($this->sortby != 16 ? '1' : $sort).'\')">'.$lang['sort_by_insert'].' <span class="faicon '.($this->sortby != 16 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 14 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'14\',\''.($this->sortby != 14 ? '1' : $sort).'\')">'.$lang['sort_by_edit'].' <span class="faicon '.($this->sortby != 14 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 18 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'18\',\''.($this->sortby != 18 ? '1' : $sort).'\')">Status <span class="faicon '.($this->sortby != 18 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 7 ? ' class="active"' : '').'><a href="#" onClick="surveyList_goTo(\'7\',\''.($this->sortby != 7 ? '1' : $sort).'\')"><li '.($this->sortby == 7 ? ' class="active"' : '').'>'.$lang['sort_by_author'].' <span class="faicon '.($this->sortby != 7 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '<li '.($this->sortby == 11 ? ' class="active"' : '').' style="border:0;"><a href="#" onClick="surveyList_goTo(\'11\',\''.($this->sortby != 11 ? '1' : $sort).'\')">'.$lang['sort_by_editor'].' <span class="faicon '.($this->sortby != 11 ? 'sort_unsorted' : $img_src).'"></span></a></li>';
echo '</ul>';
echo '</div>';
}
// Prikazemo gumb za filtriranje seznama anket
private function displayFilterButton(){
global $lang, $site_url, $admin_languages;
echo '<div id="filterButton" '.(($this->user_id || $this->lang_id != 0 || $this->gdpr != 0) ? 'class="active"' : '').'>';
echo $lang['srv_analiza_filter'];
echo '<div id="filterSettings">';
echo '<ul>';
# filter po uporabniku
echo '<li>';
echo '<span class="filter_title">'.$lang['srv_list_author'].'</span>';
// Ce preklapljamo v searchu moramo refreshati celo stran (druga js funkcija)
$reload = ($this->isSearch == 1) ? '_reload' : '';
echo '<span class="filter_line"><input type="radio" name="filter_mySurveys" id="filter_mySurveys_0" value="0" '.(!$this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'clr\',\'0\');"> <label for="filter_mySurveys_0">'.$lang['srv_list_all_surveys'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_mySurveys" id="filter_mySurveys_1" value="1" '.($this->user_id ? 'checked="checked"' : '').' onclick="surveyList_user'.$reload.'(\'uid\',\''.$this->g_uid.'\');"> <label for="filter_mySurveys_1">'.$lang['srv_list_my_surveys'].'</label></span>';
echo '</li>';
# filter po jeziku
echo '<li>';
echo '<span class="filter_title">'.$lang['srv_sl_set_language'].'</span>';
echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_0" value="0" '.((int)$this->lang_id == 0 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'0\');"> <label for="filter_language_0">'.$lang['srv_sl_set_language_all'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_1" value="1" '.((int)$this->lang_id == 1 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'1\');"> <label for="filter_language_1">'.$admin_languages['1'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_language" id="filter_language_2" value="2" '.((int)$this->lang_id == 2 ? 'checked="checked"' : '').' onclick="surveyList_language'.$reload.'(\'2\');"> <label for="filter_language_2">'.$admin_languages['2'].'</label></span>';
echo '</li>';
# filter po GDPR anketah
echo '<li>';
echo '<span class="filter_title">'.$lang['srv_gdpr'].'</span>';
echo '<span class="filter_line"><input type="radio" name="filter_gdpr" id="filter_gdpr_0" value="0" '.((int)$this->gdpr == 0 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'0\');"> <label for="filter_gdpr_0">'.$lang['srv_list_all_surveys'].'</label></span>';
echo '<span class="filter_line"><input type="radio" name="filter_gdpr" id="filter_gdpr_1" value="1" '.((int)$this->gdpr == 1 ? 'checked="checked"' : '').' onclick="surveyList_gdpr'.$reload.'(\'1\');"> <label for="filter_gdpr_1">'.$lang['srv_list_gdpr_gdpr'].'</label></span>';
echo '</li>';
echo '</ul>';
echo '</div>';
echo '</div>';
}
// Prikazemo preklop med navadnim pogledom in pogledom s folderji
private function displayFolderSwitch(){
global $lang, $global_user_id;
// Preverimo, ce je funkcionalnost v paketu, ki ga ima uporabnik
$userAccess = UserAccess::getInstance($global_user_id);
// Ce ni na voljo
if(!$userAccess->checkUserAccess('my_survey_folders')){
echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" class="user_access_locked" onClick="popupUserAccess(\'my_survey_folders\');">';
echo $lang['srv_mySurvey_show_folders'];
echo '</div>';
}
else{
echo '<div title="'.$lang['srv_mySurvey_show_folders_desc'].'" id="folderSwitch" onClick="switchFolder(\''.$this->show_folders.'\');">';
echo ' <span>'.$lang['srv_mySurvey_show_folders'].'</span>';
// Stikalo za folderje
if($this->show_folders == 1)
echo ' <div class="switch_folders on"></div>';
else
echo ' <div class="switch_folders off"></div>';
echo '</div>';
}
}
private function displaySettingsUrl() {
global $lang;
@ -853,21 +1020,6 @@ class SurveyListFolders {
echo '</form>';
}
// Prikazemo search okno za iskanje po anketah
public function displaySearch(){
global $lang;
global $site_url;
echo '<form method="GET" id="1kasmysurvey" action="'.$site_url.'admin/survey/index.php">';
echo '<input id="searchMySurvey" type="text" value="" placeholder="'.$lang['s_search_mySurvey'].'" name="search" />';
echo ' <button class="medium white-black" onclick="$(\'#1kasmysurvey\').submit(); return false;">';
echo $lang['s_search2'];
echo ' </button>';
echo '</form>';
}
/** polovimo nastavitve prikaza za posameznega uporabnika

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
// Meni na levi
.left_menu{
.left_content{
flex-shrink: 0;
width: 320px;
@ -31,7 +31,10 @@
text-transform: uppercase;
}
.folder-item{
.folder_list{
.folder_item{
box-sizing: border-box;
height: 40px;
margin-bottom: 8px;
@ -40,20 +43,24 @@
border-radius: 2px;
}
}
}
// Vsebina na desni
.right_content{
width: auto;
padding: 32px 16px;
.title{
.folder_title{
margin-bottom: 24px;
font-weight: 600;
font-size: 16px;
}
/*.second_line{
display: flex;
} */
}
}
}

View File

@ -9660,3 +9660,7 @@ UPDATE misc SET value='22.08.05' WHERE what="version";
INSERT INTO srv_misc (what, value) VALUES ('pc_tables', '0');
UPDATE misc SET value='22.08.25' WHERE what="version";
ALTER TABLE srv_mysurvey_folder ADD active enum('0','1') NOT NULL DEFAULT '0';
UPDATE misc SET value='22.10.04' WHERE what="version";