Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experts Pluslet styling in guide admin page, UM theme, default theme … #371

Merged
merged 1 commit into from Dec 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions assets/css/admin/admin_styles.css
Expand Up @@ -1722,10 +1722,12 @@ h4.toc-heading {margin: 6px 0;}
.articlesplus-search {margin: 0 10px;}



/* Book Search Pluslet- default */
.book-search {margin: 0 10px;}



/* Google Search Pluslet */
.google-search {margin: 0 10px;}

Expand Down Expand Up @@ -1754,6 +1756,53 @@ h4.guide-select-heading {margin: 6px 0;}



/*Experts Pluslet, circles style */
.find-expert-area-circ {padding:0;}

.expert-list-circ {list-style-type: none; margin:15px 0 15px 0; padding:0 !important;}
.expert-list-circ li {
display:inline-block;
margin: 0 0 10px 0;
padding:0;
width:120px;
position:relative;
}

.expert-list-circ .expert-img {display: block; text-align: center;}
.expert-list-circ .expert-img img.staff_photo_full {padding:0; background-color: transparent; width: 80px; height: 80px; border: none; border-radius: 50%;}
.expert-list-circ .expert-label {display: block; text-align: center; padding:3px 0; width:100%; font-size:0.9em; line-height: 1.1em;}
.expert-list-circ .expert-title {display: block; font-size:0.95em; line-height: 1.2em; padding:5px; color:#FFF;}
.expert-list-circ .expert-subjects {display: block; text-align: left; padding:5px; font-size: 0.85em; line-height: 1.2em; color: #FFF;}

/*Expert tooltips */

.expert-list-circ li:hover .expert-tooltip {display:block;}

.expert-tooltip {
position:absolute;
top:-20px;
right:92%;
display:none;
margin:5px;
width:175px;
min-height:120px;
border-radius: 2px;
background-color: rgba(102, 102, 102, 0.9);
z-index:99999;
padding: 5px;
color: #FFF;
}

.expert-tooltip:before {
content:"\A";
border-style: solid;
border-width: 15px 0 15px 15px;
border-color: transparent transparent transparent rgba(102, 102, 102, 0.9);
position: absolute;
right: -15px;
top:35%;
}




Expand Down
54 changes: 54 additions & 0 deletions assets/css/public/cleanwhite.css
Expand Up @@ -1322,6 +1322,60 @@ h4.toc-heading {margin: 6px 0; font-weight: bold;}
h4.guide-select-heading {margin: 6px 0; font-weight: bold;}
.pluslet_container .pure-form select {width:200px !important;}

/* HTML5 Video Pluslet - Front-end */
.video-container {margin-bottom: 10px;}



/*Experts Pluslet - Front-end */
.type-experts .pluslet_body {overflow: initial !important;}

.find-expert-area-circ {padding:0;}

.expert-list-circ {list-style-type: none; margin:15px 0 15px 0; padding:0 !important;}
.expert-list-circ li {
display:inline-block;
margin: 0 0 10px 0;
padding:0;
width:120px;
position:relative;
}

.expert-list-circ .expert-img {display: block; text-align: center;}
.expert-list-circ .expert-img img.staff_photo_full {padding:0; background-color: transparent; width: 80px; height: 80px; border: none; border-radius: 50%;}
.expert-list-circ .expert-label {display: block; text-align: center; padding:3px 0; width:100%; font-size:0.9em; line-height: 1.1em;}
.expert-list-circ .expert-title {display: block; font-size:0.95em; line-height: 1.2em; padding:5px; color:#FFF;}
.expert-list-circ .expert-subjects {display: block; text-align: left; padding:5px; font-size: 0.85em; line-height: 1.2em; color: #FFF;}

/*Expert tooltips */

.expert-list-circ li:hover .expert-tooltip {display:block;}

.expert-tooltip {
position:absolute;
top:-20px;
right:92%;
display:none;
margin:5px;
width:175px;
min-height:120px;
border-radius: 2px;
background-color: rgba(102, 102, 102, 0.9);
z-index:99999;
padding: 5px;
color: #FFF;
}

.expert-tooltip:before {
content:"\A";
border-style: solid;
border-width: 15px 0 15px 15px;
border-color: transparent transparent transparent rgba(102, 102, 102, 0.9);
position: absolute;
right: -15px;
top:35%;
}



/* Media Queries */
Expand Down
52 changes: 52 additions & 0 deletions assets/css/public/default.css
Expand Up @@ -1328,6 +1328,58 @@ h4.guide-select-heading {margin: 6px 0; font-weight: bold;}



/*Experts Pluslet - Front-end */
.type-experts .pluslet_body {overflow: initial !important;}

.find-expert-area-circ {padding:0;}

.expert-list-circ {list-style-type: none; margin:15px 0 15px 0; padding:0 !important;}
.expert-list-circ li {
display:inline-block;
margin: 0 0 10px 0;
padding:0;
width:120px;
position:relative;
}

.expert-list-circ .expert-img {display: block; text-align: center;}
.expert-list-circ .expert-img img.staff_photo_full {padding:0; background-color: transparent; width: 80px; height: 80px; border: none; border-radius: 50%;}
.expert-list-circ .expert-label {display: block; text-align: center; padding:3px 0; width:100%; font-size:0.9em; line-height: 1.1em;}
.expert-list-circ .expert-title {display: block; font-size:0.95em; line-height: 1.2em; padding:5px; color:#FFF;}
.expert-list-circ .expert-subjects {display: block; text-align: left; padding:5px; font-size: 0.85em; line-height: 1.2em; color: #FFF;}

/*Expert tooltips */

.expert-list-circ li:hover .expert-tooltip {display:block;}

.expert-tooltip {
position:absolute;
top:-20px;
right:92%;
display:none;
margin:5px;
width:175px;
min-height:120px;
border-radius: 2px;
background-color: rgba(102, 102, 102, 0.9);
z-index:99999;
padding: 5px;
color: #FFF;
}

.expert-tooltip:before {
content:"\A";
border-style: solid;
border-width: 15px 0 15px 15px;
border-color: transparent transparent transparent rgba(102, 102, 102, 0.9);
position: absolute;
right: -15px;
top:35%;
}





/* Media Queries */

Expand Down
5 changes: 5 additions & 0 deletions assets/css/public/um.css
Expand Up @@ -1610,6 +1610,11 @@ img.center-image {
top:35%;
}

/*Experts Pluslet - Front-end */
.type-experts .pluslet_body {overflow: initial !important;}
.type-experts .find-expert-area-circ {padding:0; margin: 0;}
.type-experts .expert-list-circ {margin: 15px 0 !important;}
.type-experts .expert-list-circ li {display: inline-block !important; margin: 0 0 10px !important;}


/* //////////////////
Expand Down
7 changes: 4 additions & 3 deletions assets/js/guides/pluslet.js
Expand Up @@ -9,10 +9,11 @@ function pluslet() {

var myPluslet = {
settings : {
hideBodyContent : ['.pluslet.type-heading','.pluslet.type-worldcat' ,'.pluslet.type-catalog','.pluslet.type-relguide', '.pluslet.type-articleplus','.pluslet.type-toc','.pluslet.type-googlebooks','.pluslet.type-googlescholar','.pluslet.type-googlesearch','.pluslet.type-guideselect','.pluslet.type-newdbs','.pluslet.type-guidesearch','.pluslet.type-newguides'],
hideLinksNewTab : ['.pluslet.type-heading','.pluslet.type-video','.pluslet.type-worldcat','.pluslet.type-catalog','.pluslet.type-relguide','.pluslet.type-articleplus','.pluslet.type-toc','.pluslet.type-googlebooks','.pluslet.type-googlescholar','.pluslet.type-googlesearch','.pluslet.type-guideselect','.pluslet.type-guidesearch'],
hideBodyContent : ['.pluslet.type-heading','.pluslet.type-worldcat' ,'.pluslet.type-catalog','.pluslet.type-relguide', '.pluslet.type-articleplus','.pluslet.type-toc','.pluslet.type-googlebooks','.pluslet.type-googlescholar','.pluslet.type-googlesearch','.pluslet.type-guideselect','.pluslet.type-newdbs','.pluslet.type-guidesearch','.pluslet.type-newguides','.pluslet.type-experts', '.pluslet.type-guidelist', '.pluslet.type-collectionlist'],
hideLinksNewTab : ['.pluslet.type-heading','.pluslet.type-video','.pluslet.type-worldcat','.pluslet.type-catalog','.pluslet.type-relguide','.pluslet.type-articleplus','.pluslet.type-toc','.pluslet.type-googlebooks','.pluslet.type-googlescholar','.pluslet.type-googlesearch','.pluslet.type-guideselect','.pluslet.type-guidesearch', '.pluslet.type-experts', '.pluslet.type-collectionlist'],
hideTitleBar : ['.pluslet.type-heading','.pluslet.type-toc'],
hideMakeFavorite :['.pluslet.type-worldcat','.pluslet.type-catalog','.pluslet.type-articleplus','.pluslet.type-relguide','.pluslet.type-googlebooks','.pluslet.type-googlescholar','.pluslet.type-googlesearch','.pluslet.type-guideselect','.pluslet.type-newdbs','.pluslet.type-guidesearch','.pluslet.type-newguides']
hideMarkFavorite :['.pluslet.type-worldcat','.pluslet.type-catalog','.pluslet.type-articleplus','.pluslet.type-relguide',
'.pluslet.type-googlebooks','.pluslet.type-googlescholar','.pluslet.type-googlesearch','.pluslet.type-guideselect','.pluslet.type-newdbs','.pluslet.type-guidesearch','.pluslet.type-newguides','.pluslet.type-experts', '.pluslet.type-guidelist', '.pluslet.type-collectionlist']

},
strings : {
Expand Down
40 changes: 17 additions & 23 deletions lib/SubjectsPlus/Control/Pluslet/Experts.php
Expand Up @@ -56,42 +56,36 @@ public function outputExperts() {
AND s.active = 1
AND sub.active = 1
AND ptags LIKE '%librarian%'
GROUP BY s.staff_id
ORDER BY RAND()
LIMIT 0,3";
GROUP BY s.staff_id
ORDER BY RAND()
LIMIT 0,4";

$expertArray = $this->db->query($q);

// init our columns
$col_1 = "<div class=\"pure-u-1-2\">";
$col_2 = "<div class=\"pure-u-1-2\">";
// the text that shows up in the blank box
$bonus_text = "<br />" . _("Need help? Ask an expert.");
// init list item
$expert_item = "";

// additional text
$bonus_text = _("Need help? Ask an expert.");

$row_count = 0;

foreach ($expertArray as $key => $value) {

$image = getHeadshot($value['email'], "smaller","staff_photo");
$profile = "<div>" . $image . "<br />" . $value['fullname'] . "</div>";
$exp_image = getHeadshotFull($value['email']);

$librarian_email = $value['email'];
$name_id = explode("@", $librarian_email);

// this is to display two cols, col_1 with expert then text, col_2 with expert then expert
if ($row_count % 2 == 0) {
$col_2 .= $profile;
} else {
$col_1 .= $profile;
}
$exp_profile = "<li><div class=\"expert-img\">" . $exp_image . "</div><div class=\"expert-label\"><a href=\"" . PATH_TO_SP . "subjects/staff_details.php?name=" . $name_id[0] . "\">" . $value['fullname'] . "</a></div><div class=\"expert-tooltip\" id=\"tooltip-" . $name_id[0] . "\"><div class=\"expert-title\">" . $value['title'] ."</div><div class=\"expert-subjects\"><strong>Subjects:</strong> " . $value['subject'] ." ...</div></div></li>";

$row_count++;
$expert_item .= $exp_profile;
}


$col_1 .= "$bonus_text</div>";
$col_2 .= "</div>";
$guide_experts = "$expert_item";

$list_guides = "<div class=\"pure-g expert_list\">$col_1 $col_2</div>";
$list_guide_experts = "<div class=\"find-expert-area-circ\">$bonus_text<br /><ul class=\"expert-list-circ\">$guide_experts</ul></div>";

return $list_guides;
return $list_guide_experts;

}

Expand Down