mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-17 15:29:55 -04:00
Apply buttons to comment moderation and action buttons, beginnings of a photo stream carousel block in admin dashboard.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
<p>
|
||||
Recent photos added to your Gallery
|
||||
</p>
|
||||
<ul>
|
||||
<? foreach ($photos as $photo): ?>
|
||||
<a href="<?= url::site("photos/$photo->id") ?>" title="<?= $photo->title ?>">
|
||||
<img <?= photo::img_dimensions($photo->width, $photo->height, 72) ?>
|
||||
<li class="gItem gPhoto">
|
||||
<a href="<?= url::site("photos/$photo->id") ?>" title="<?= $photo->title ?>">
|
||||
<img <?= photo::img_dimensions($photo->width, $photo->height, 72) ?>
|
||||
src="<?= $photo->thumb_url() ?>" alt="<?= $photo->title ?>" />
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
<? endforeach ?>
|
||||
</ul>
|
||||
<p>
|
||||
<?= t("Recent photos added to your Gallery") ?>
|
||||
</p>
|
||||
|
||||
@@ -121,49 +121,44 @@
|
||||
<?= $comment->text ?>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<? if ($comment->state != "unpublished"): ?>
|
||||
<li>
|
||||
<a href="javascript:set_state('unpublished',<?=$comment->id?>)">
|
||||
<?= t("Unapprove") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
<? if ($comment->state != "published"): ?>
|
||||
<li>
|
||||
<a href="javascript:set_state('published',<?=$comment->id?>)">
|
||||
<?= t("Approve") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
<? if ($comment->state != "spam"): ?>
|
||||
<li>
|
||||
<a href="javascript:set_state('spam',<?=$comment->id?>)">
|
||||
<?= t("Spam") ?>
|
||||
</a>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
<li>
|
||||
<a href="javascript:reply(<?=$comment->id?>)">
|
||||
<?= t("Reply") ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javascript:Edit(<?=$comment->id?>)">
|
||||
<?= t("Edit") ?>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javascript:set_state('deleted',<?=$comment->id?>)">
|
||||
<?= t("Delete") ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="gButtonSetVertical">
|
||||
<? if ($comment->state != "unpublished"): ?>
|
||||
<a href="javascript:set_state('unpublished',<?=$comment->id?>)"
|
||||
class="gButtonLink ui-state-default ui-icon-left">
|
||||
<span class="ui-icon ui-icon-check"></span>
|
||||
<?= t("Unapprove") ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<? if ($comment->state != "published"): ?>
|
||||
<a href="javascript:set_state('published',<?=$comment->id?>)"
|
||||
class="gButtonLink ui-state-default ui-icon-left">
|
||||
<span class="ui-icon ui-icon-check"></span>
|
||||
<?= t("Approve") ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<? if ($comment->state != "spam"): ?>
|
||||
<a href="javascript:set_state('spam',<?=$comment->id?>)"
|
||||
class="gButtonLink ui-state-default ui-icon-left">
|
||||
<span class="ui-icon ui-icon-cancel"></span>
|
||||
<?= t("Spam") ?>
|
||||
</a>
|
||||
<? endif ?>
|
||||
<a href="javascript:reply(<?=$comment->id?>)"
|
||||
class="gButtonLink ui-state-default ui-icon-left">
|
||||
<span class="ui-icon ui-icon-arrowreturnthick-1-w"></span>
|
||||
<?= t("Reply") ?>
|
||||
</a>
|
||||
<a href="javascript:Edit(<?=$comment->id?>)"
|
||||
class="gButtonLink ui-state-default ui-icon-left">
|
||||
<span class="ui-icon ui-icon-pencil"></span>
|
||||
<?= t("Edit") ?>
|
||||
</a>
|
||||
<a href="javascript:set_state('deleted',<?=$comment->id?>)"
|
||||
class="gButtonLink ui-state-default ui-icon-left">
|
||||
<span class="ui-icon ui-icon-trash"></span>
|
||||
<?= t("Delete") ?>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<? endforeach ?>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
#gHeader {
|
||||
background-color: #e8e8e8;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-top: 0;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
@@ -114,14 +114,52 @@
|
||||
background: none;
|
||||
}
|
||||
|
||||
#gPhotoStream {
|
||||
background-color: #e8e8e8;
|
||||
}
|
||||
|
||||
#gPhotoStream .gBlockContent {
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
|
||||
#gPhotoStream .gBlockContent ul {
|
||||
border-right: 1px solid #e8e8e8;
|
||||
height: 92px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#gContent #gPhotoStream .gItem {
|
||||
background-color: #fff;
|
||||
border: 1px solid #e8e8e8;
|
||||
border-right-color: #ccc;
|
||||
border-bottom-color: #ccc;
|
||||
float: left;
|
||||
font-size: .7em;
|
||||
height: 90px;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
#gSiteStatus {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#gAdminCommentsMenu {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#gAdminCommentsMenu li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#gAdminCommentsMenu a {
|
||||
margin: 0;
|
||||
padding: .2em .6em;
|
||||
}
|
||||
|
||||
#gAdminGraphics .gAvailable .gBlock {
|
||||
clear: none;
|
||||
float: left;
|
||||
@@ -196,3 +234,7 @@ li.gGroup {
|
||||
.ui-sortable {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.gButtonSetVertical a {
|
||||
width: 8em;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,21 @@ $(document).ready(function(){
|
||||
$(dialogLinks[i]).bind("click", handleDialogEvent);
|
||||
}
|
||||
|
||||
if ($("#gPhotoStream").length) {
|
||||
// Vertically align thumbs in photostream
|
||||
$('.gItem').vAlign();
|
||||
}
|
||||
|
||||
// Round view menu buttons
|
||||
if ($("#gAdminCommentsMenu").length) {
|
||||
$("#gAdminCommentsMenu ul").removeClass("gMenu").removeClass("sf-menu");
|
||||
$("#gAdminCommentsMenu").addClass("gToolBar");
|
||||
$("#gAdminCommentsMenu ul").addClass("gButtonSet");
|
||||
$("#gAdminCommentsMenu a").addClass("gButtonLink ui-state-default");
|
||||
$("#gAdminCommentsMenu ul li:first a").addClass("ui-corner-left");
|
||||
$("#gAdminCommentsMenu ul li:last a").addClass("ui-corner-right");
|
||||
}
|
||||
|
||||
// Apply hide/show functionality on user admin view
|
||||
var panelLinks = $(".gPanelLink");
|
||||
for (i=0; i<panelLinks.length; i++) {
|
||||
@@ -137,4 +152,22 @@ function togglePanel(element, on_success) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Vertically align a block element's content
|
||||
(function ($) {
|
||||
$.fn.vAlign = function(container) {
|
||||
return this.each(function(i){
|
||||
if (container == null) {
|
||||
container = 'div';
|
||||
}
|
||||
$(this).html("<" + container + ">" + $(this).html() + "</" + container + ">");
|
||||
var el = $(this).children(container + ":first");
|
||||
var elh = $(el).height();
|
||||
var ph = $(this).height();
|
||||
var nh = (ph - elh) / 2;
|
||||
$(el).css('margin-top', nh);
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user