Redesign - moje ankete - V DELU
This commit is contained in:
parent
348a67f645
commit
7a39826a2d
@ -879,115 +879,112 @@ class SurveyList {
|
||||
public function getSurveys() {
|
||||
global $global_user_id;
|
||||
global $lang;
|
||||
|
||||
// ali imamo star napreden vmesnik za moje ankete
|
||||
$advancedMySurveys = UserSetting::getInstance()->getUserSetting('advancedMySurveys');
|
||||
|
||||
// Nastavitve zgoraj - nekatere niso prikazane pri searchu
|
||||
|
||||
|
||||
// Gumba za ustvarjanje ankete - nekatere niso prikazane pri searchu
|
||||
if($this->isSearch != 1){
|
||||
|
||||
// Gumb za ustvarjanje ankete
|
||||
echo '<div id="anketa_new_float">';
|
||||
echo '<div class="first_line">';
|
||||
$this->new_anketa_div();
|
||||
echo '</div>';
|
||||
|
||||
// Paginacija
|
||||
echo '<div id="pagination">';
|
||||
$this->displayPagiantion();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Sort gumb - samo v novem vmesniku
|
||||
if($advancedMySurveys != 1 && $this->onlyPhone == false){
|
||||
echo '<div id="sortButton">';
|
||||
$this->displaySortButton();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Gumb za filtriranje - samo v novem vmesniku
|
||||
//if($this->g_adminType <= 1){
|
||||
if($advancedMySurveys != 1 && $this->onlyPhone == false){
|
||||
//echo '<div id="filterButton">';
|
||||
$this->displayFilterButton();
|
||||
//echo '</div>';
|
||||
}
|
||||
|
||||
// Preklop na pogled s folderji (samo ce imamo nov vmesnik)
|
||||
if($this->isSearch != 1){
|
||||
if($advancedMySurveys != 1 && $this->onlyPhone == false){
|
||||
//echo '<div id="folderSwitch">';
|
||||
$this->displayFolderSwitch();
|
||||
//echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
// Nastavitve zgoraj - nekatere niso prikazane pri searchu
|
||||
|
||||
// Druga vrstica - filtri in iskanje
|
||||
echo '<div class="second_line">';
|
||||
|
||||
// Nastavitve zgoraj - nekatere niso prikazane pri searchu
|
||||
if($this->isSearch != 1){
|
||||
// Gumb z nastavitvami pogleda - za star vmesnik
|
||||
if ($this->onlyPhone == false && $advancedMySurveys == 1){
|
||||
$this->displaySettingsUrl();
|
||||
}
|
||||
|
||||
// Okno za search po mojeih anketah
|
||||
echo '<div id="searchMySurveys">';
|
||||
$this->displaySearch();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Izris seznama anket - star oz. nov design
|
||||
if($advancedMySurveys == 1){
|
||||
$this->displaySurveyList();
|
||||
}
|
||||
else{
|
||||
if($this->show_folders == 1 && $this->isSearch != 1){
|
||||
|
||||
// Info box za posamezno anketo (hover)
|
||||
echo '<div id="survey_list_info"></div>';
|
||||
|
||||
echo '<div class="clr"></div>';
|
||||
|
||||
// Loop po vseh folderjih prvega nivoja - samo na prvi strani
|
||||
if($this->pageno == 1){
|
||||
// Plus za dodajanje folderja
|
||||
echo '<div style="margin: 15px 0 -15px 0"><a style="vertical-align:0px; line-height:18px;" href="#" title="'.$lang['srv_mySurvey_create_folder'].'" onClick="create_folder(\''.$folder['id'].'\'); return false;">';
|
||||
echo '<span style="vertical-align:middle;" class="faicon add icon-blue-hover-orange pointer"></span> <span style="vertical-align:middle;" class="bold">'.$lang['srv_mySurvey_create_folder'].'</span>';
|
||||
echo '</a></div>';
|
||||
|
||||
$sql = sisplet_query("SELECT * FROM srv_mysurvey_folder WHERE usr_id='$global_user_id' AND parent='0' ORDER BY naslov ASC");
|
||||
if(mysqli_num_rows($sql) > 0) {
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
echo '<div id="folder_holder_'.$row['id'].'" class="folder_holder level1">';
|
||||
$this->displayNewFolder($row);
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Na koncu se izpisemo ankete ki niso v nobenem folderju
|
||||
$row = array('id'=>0, 'naslov'=>$lang['srv_mySurvey_unallocated']);
|
||||
echo '<div id="folder_holder_0" class="folder_holder level1">';
|
||||
$this->displayNewFolder($row);
|
||||
echo '</div>';
|
||||
|
||||
echo '<script type="text/javascript">surveyList_folder_init();</script>';
|
||||
}
|
||||
// Ce ne prikazujemo map je vse po starem
|
||||
else{
|
||||
// Info box za posamezno anketo (hover)
|
||||
echo '<div id="survey_list_info"></div>';
|
||||
|
||||
echo '<div id="div_sl_new_-1" class="div_sl_new">';
|
||||
$this->displayNewSurveyList($folder=-1);
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Paginacija - se na dnu - ni prikazana pri searchu
|
||||
|
||||
// Paginacija
|
||||
echo '<div class="pagination top">';
|
||||
$this->displayPagiantion();
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Filtri na desni
|
||||
if($this->onlyPhone == false){
|
||||
|
||||
echo '<div class="filters">';
|
||||
|
||||
// Preklop na pogled s folderji (samo ce imamo nov vmesnik)
|
||||
if($this->isSearch != 1){
|
||||
echo '<div id="pagination" class="bottom">';
|
||||
$this->displayPagiantion();
|
||||
echo '</div><br /><br />';
|
||||
//echo '<div id="folderSwitch">';
|
||||
$this->displayFolderSwitch();
|
||||
//echo '</div>';
|
||||
}
|
||||
|
||||
// Gumb za filtriranje
|
||||
//echo '<div id="filterButton">';
|
||||
$this->displayFilterButton();
|
||||
//echo '</div>';
|
||||
|
||||
// Gumb za sortiranje
|
||||
echo '<div id="sortButton">';
|
||||
$this->displaySortButton();
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Izris seznama anket
|
||||
if($this->show_folders == 1 && $this->isSearch != 1){
|
||||
|
||||
// Info box za posamezno anketo (hover)
|
||||
echo '<div id="survey_list_info"></div>';
|
||||
|
||||
echo '<div class="clr"></div>';
|
||||
|
||||
// Loop po vseh folderjih prvega nivoja - samo na prvi strani
|
||||
if($this->pageno == 1){
|
||||
// Plus za dodajanje folderja
|
||||
echo '<div style="margin: 15px 0 -15px 0"><a style="vertical-align:0px; line-height:18px;" href="#" title="'.$lang['srv_mySurvey_create_folder'].'" onClick="create_folder(\''.$folder['id'].'\'); return false;">';
|
||||
echo '<span style="vertical-align:middle;" class="faicon add icon-blue-hover-orange pointer"></span> <span style="vertical-align:middle;" class="bold">'.$lang['srv_mySurvey_create_folder'].'</span>';
|
||||
echo '</a></div>';
|
||||
|
||||
$sql = sisplet_query("SELECT * FROM srv_mysurvey_folder WHERE usr_id='$global_user_id' AND parent='0' ORDER BY naslov ASC");
|
||||
if(mysqli_num_rows($sql) > 0) {
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
echo '<div id="folder_holder_'.$row['id'].'" class="folder_holder level1">';
|
||||
$this->displayNewFolder($row);
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Na koncu se izpisemo ankete ki niso v nobenem folderju
|
||||
$row = array('id'=>0, 'naslov'=>$lang['srv_mySurvey_unallocated']);
|
||||
echo '<div id="folder_holder_0" class="folder_holder level1">';
|
||||
$this->displayNewFolder($row);
|
||||
echo '</div>';
|
||||
|
||||
echo '<script type="text/javascript">surveyList_folder_init();</script>';
|
||||
}
|
||||
// Ce ne prikazujemo map je vse po starem
|
||||
else{
|
||||
// Info box za posamezno anketo (hover)
|
||||
echo '<div id="survey_list_info"></div>';
|
||||
|
||||
echo '<div id="div_sl_new_-1" class="div_sl_new">';
|
||||
$this->displayNewSurveyList($folder=-1);
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Paginacija - se na dnu - ni prikazana pri searchu
|
||||
if($this->isSearch != 1){
|
||||
echo '<div class="pagination bottom">';
|
||||
$this->displayPagiantion();
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
function displaySurveyList() {
|
||||
@ -1133,14 +1130,20 @@ class SurveyList {
|
||||
global $admin_type;
|
||||
global $site_url;
|
||||
|
||||
echo '<span id="buttonCreate" class="floatLeft"><a href="' . $site_url . 'admin/survey/index.php?a=ustvari_anketo" title="' . $lang['srv_create_survey'] . '">';
|
||||
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 '</a></span>';
|
||||
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 '<span class="floatLeft" style="margin:10px 0 0 20px; font-weight:600;"><a style="vertical-align:0px; line-height:18px;" href="#" onclick="newAnketaBlank();" title="' . $lang['one_click_create'] . '"><span style="vertical-align:top;" class="faicon add icon-blue-hover-orange"></span> <span>'.$lang['one_click_create'].'</span></a>';
|
||||
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>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -549,8 +549,10 @@ class CrossRoad {
|
||||
# MOJE ANKETE
|
||||
case 'pregledovanje':
|
||||
default:
|
||||
$layout_width = 'fullwidth';
|
||||
$layout_width = 'wide';
|
||||
|
||||
if ($_GET['a'] == 'ustvari_anketo') {
|
||||
$layout_width = 'fullwidth';
|
||||
$layout_menu = 'menu_left';
|
||||
$hide_header = 'hide_header';
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@
|
||||
@import "top_buttons";
|
||||
@import "top_filters";
|
||||
@import "survey_list";
|
34
resources/sass/admin_new/pages/my_surveys/survey_list.scss
Normal file
34
resources/sass/admin_new/pages/my_surveys/survey_list.scss
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
Seznam anket pri mojih anketah
|
||||
*/
|
||||
|
||||
#survey_list .div_sl_new{
|
||||
|
||||
table#surveyList_new{
|
||||
width: 100%;
|
||||
|
||||
tr{
|
||||
|
||||
td{
|
||||
vertical-align: middle;
|
||||
|
||||
border-bottom: 1px $dark-gray2 solid;
|
||||
}
|
||||
|
||||
&.sl_header_new td{
|
||||
height: 62px;
|
||||
padding: 0 8px;
|
||||
|
||||
vertical-align: middle;
|
||||
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
|
||||
background-color: $light-gray;
|
||||
|
||||
border-top: 1px $dark-gray2 solid;
|
||||
border-bottom: 1px $dark-gray2 solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
30
resources/sass/admin_new/pages/my_surveys/top_buttons.scss
Normal file
30
resources/sass/admin_new/pages/my_surveys/top_buttons.scss
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
Gumbi na vrhu pri mojih anketah
|
||||
*/
|
||||
|
||||
#survey_list .first_line{
|
||||
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
align-items: center;
|
||||
|
||||
margin-bottom: 40px;
|
||||
|
||||
.button_create {
|
||||
|
||||
}
|
||||
|
||||
.button_quick_create {
|
||||
margin-left: 32px;
|
||||
|
||||
a{
|
||||
text-decoration: none;
|
||||
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.faicon{
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
101
resources/sass/admin_new/pages/my_surveys/top_filters.scss
Normal file
101
resources/sass/admin_new/pages/my_surveys/top_filters.scss
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
Filtri na vrhu pri mojih anketah
|
||||
*/
|
||||
|
||||
#survey_list{
|
||||
|
||||
.second_line{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
margin-bottom: 40px;
|
||||
|
||||
// Iskanje po anketah
|
||||
#searchMySurveys{
|
||||
width: 33%;
|
||||
|
||||
form{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
// Filtri
|
||||
.filters{
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
align-items: center;
|
||||
|
||||
width: 33%;
|
||||
|
||||
#filterButton,
|
||||
#sortButton,
|
||||
#folderSwitch{
|
||||
cursor: pointer;
|
||||
|
||||
box-sizing: border-box;
|
||||
margin-left: 16px;
|
||||
padding: 12px 8px;
|
||||
|
||||
border: 1px $dark-gray solid;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
|
||||
// Gumb za sort in filtriranje - nastavitve na hover
|
||||
#filterButton,
|
||||
#sortButton{
|
||||
|
||||
#filterSettings,
|
||||
#sortSettings{
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 9999;
|
||||
|
||||
width: 160px;
|
||||
margin-top: 12px;
|
||||
padding: 0 10px;
|
||||
|
||||
text-align: left;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
&:hover{
|
||||
|
||||
#filterSettings,
|
||||
#sortSettings{
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Gumb za mape
|
||||
#folderSwitch{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Paginacija
|
||||
.pagination{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&.top{
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
&.bottom{
|
||||
margin-top: 32px;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user