Skip to content

Commit

Permalink
Merge branch '2.0' of github.com:s9y/Serendipity into 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ophian committed Dec 8, 2012
2 parents 9aebc99 + 8784c81 commit 2ea4159
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 32 deletions.
6 changes: 3 additions & 3 deletions include/admin/tpl/category.inc.tpl
Expand Up @@ -139,11 +139,11 @@
<details class="category_data">
<summary class="category_name{if $category.category_icon} category_hasicon{/if}"><span class="icon-folder-open"></span> {$category.category_name|escape:"html"}</summary>

<div class="category_info">
<div class="category_info clearfix">
{if $category.category_description != ''}
<span class="category_desc block_level">{$category.category_description|escape:"html"}</span>
<span class="category_desc">{$category.category_description|escape:"html"}</span>
{/if}
<span class="category_author block_level">{if $category.authorid == 0}{$CONST.ALL_AUTHORS}{else}{$category.realname|escape:"html"}{/if}</span>
<span class="category_author">{if $category.authorid == 0}{$CONST.ALL_AUTHORS}{else}{$category.realname|escape:"html"}{/if}</span>
</div>
</details>

Expand Down
44 changes: 25 additions & 19 deletions include/admin/tpl/comments.inc.tpl
Expand Up @@ -72,37 +72,37 @@ function highlightComment(id, checkvalue) {

<div class="clearfix">
<div class="form_field">
<label for="filter_author">{$CONST.AUTHOR}:</label>
<label for="filter_author">{$CONST.AUTHOR}</label>
<input id="filter_author" name="serendipity[filter][author]" type="text" value="{$get.filter.author|escape}">
</div>

<div class="form_field">
<label for="filter_email">{$CONST.EMAIL}:</label>
<label for="filter_email">{$CONST.EMAIL}</label>
<input id="filter_email" name="serendipity[filter][email]" type="text" value="{$get.filter.email|escape}">
</div>

<div class="form_field">
<label for="filter_url">{$CONST.URL}:</label>
<label for="filter_url">{$CONST.URL}</label>
<input id="filter_url" name="serendipity[filter][url]" type="text" value="{$get.filter.url|escape}">
</div>

<div class="form_field">
<label for="filter_ip">IP:</label>
<label for="filter_ip">IP</label>
<input id="filter_ip" name="serendipity[filter][ip]" type="text" value="{$get.filter.ip|escape}">
</div>

<div class="form_field">
<label for="filter_body">{$CONST.CONTENT}:</label>
<label for="filter_body">{$CONST.CONTENT}</label>
<input id="filter_body" name="serendipity[filter][body]" type="text" value="{$get.filter.body|escape}">
</div>

<div class="form_field">
<label for="filter_referer">{$CONST.REFERER}:</label>
<label for="filter_referer">{$CONST.REFERER}</label>
<input id="filter_referer" name="serendipity[filter][referer]" type="text" value="{$get.filter.referer|escape}">
</div>

<div class="form_select">
<label for="filter_perpage">{$CONST.COMMENTS}:</label>
<label for="filter_perpage">{$CONST.COMMENTS}</label>
<select id="filter_perpage" name="serendipity[filter][perpage]">
{foreach $filter_vals AS $filter}
<option value="{$filter}" {($commentsPerPage == $filter) ? ' selected' : ''}>{$filter}</option>
Expand All @@ -111,7 +111,7 @@ function highlightComment(id, checkvalue) {
</div>

<div class="form_select">
<label for="filter_show">{$CONST.COMMENTS_FILTER_SHOW}:</label>
<label for="filter_show">{$CONST.COMMENTS_FILTER_SHOW}</label>
<select id="filter_show" name="serendipity[filter][show]">
<option value="all"{if $get.filter.show == 'all'} selected{/if}>{$CONST.COMMENTS_FILTER_ALL}</option>
<option value="approved"{if $get.filter.show == 'approved'} selected{/if}>{$CONST.COMMENTS_FILTER_APPROVED_ONLY}</option>
Expand All @@ -132,8 +132,10 @@ function highlightComment(id, checkvalue) {
</div>
</fieldset>

<input name="submit" type="submit" value="{$CONST.GO}">
{serendipity_hookPlugin hookAll=true hook="backend_comments_top" addData=$sql}
<div class="form_buttons">
<input name="submit" type="submit" value="{$CONST.GO}">
{serendipity_hookPlugin hookAll=true hook="backend_comments_top" addData=$sql}
</div>
</form>
{if !is_array($sql)}
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.NO_COMMENTS}</span>
Expand All @@ -144,9 +146,11 @@ function highlightComment(id, checkvalue) {
{$formtoken}
<input name="serendipity[formAction]" type="hidden" value="multiDelete">

<h3>{$CONST.PAGE_BROWSE_COMMENTS|sprintf:$page:$pages:$totalComments}</h3>
{if ($page != 1 && $page <= $pages)||$page != $pages}
<nav class="pagination">
<h2>{$CONST.PAGE_BROWSE_COMMENTS|sprintf:$page:$pages:$totalComments}</h2>
{if ($page != 1 && $page <= $pages)||$page != $pages}
<h4 class="visuallyhidden">Comments pagination</h4> {* i18n *}

<ul class="clearfix">
{if ($page != 1 && $page <= $pages)}
<li><a class="icon_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-circled"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a></li>
Expand All @@ -155,17 +159,19 @@ function highlightComment(id, checkvalue) {
<li><a class="icon_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="icon-right-circled"></span><span class="visuallyhidden"> {$CONST.NEXT}</span></a></li>
{/if}
</ul>
{/if}
</nav>
{/if}
{if is_array($comments)}
<ul class="plainList">
<ul id="serendipity_comments_list" class="clearfix plainList">
{foreach $comments AS $comment}
<li><h3 id="c{$comment.id}">{($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id}, {$CONST.IN_REPLY_TO} <a href="{$comment.entry_url}">{$comment.title|escape}</a> {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'}</h3>
<li class="clearfix">
<div class="form_check">
<input id="serendipity_multidelete_comment_{$comment.id}" type="checkbox" name="serendipity[delete][{$comment.id}]" value="{$comment.entry_id}" onclick="highlightComment('comment_{$comment.id}', this.checked)" tabindex="{$i}">
<label for="serendipity_multidelete_comment_{$comment.id}" class="visuallyhidden">Multiselect this comment</label> {* i18n *}
</div>

<h4 id="c{$comment.id}">{($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id}, {$CONST.IN_REPLY_TO} <a href="{$comment.entry_url}">{$comment.title|escape}</a> {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'}</h4>

<div id="comment_{$comment.id}">
<dl class="comment_data clearfix">
<dt>{$CONST.AUTHOR}:</dt>
Expand All @@ -185,10 +191,10 @@ function highlightComment(id, checkvalue) {
<dd>{if empty($comment.referer)}N/A{else}<a class="icon_link" href="{$comment.referer|escape}" title="{$comment.referer|escape}"><span class="icon-link"></span> {$comment.referer|escape|truncate:30:"&hellip;"}</a>{/if}</dd>
<dd class="action_referer">{$comment.action_referer}</dd>
</dl>

{* BUG: comment summary and fullBody seem to emit the same content?! *}
<div id="{$comment.id}_summary" class="comment_summary">{$comment.summary}</div>

<div id="{$comment.id}_full" class="comment_full" style="display:none;">{$comment.fullBody}</div>
<div id="{$comment.id}_full" class="comment_full">{$comment.fullBody}</div>

<ul class="actions clearfix">
{if ($comment.status == 'pending') || ($comment.status == 'confirm')}
Expand All @@ -200,7 +206,7 @@ function highlightComment(id, checkvalue) {
{if $comment.excerpt}
<li><a class="icon_link" href="#c{$comment.id}" onclick="FT_toggle({$comment.id}); return false;" title="{$CONST.TOGGLE_ALL}"><span id="{$comment.id}_text">{$CONST.TOGGLE_ALL}</span></a></li>
{/if}
<li><a class="icon_link" href="{$entrylink}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li>
<li><a class="icon_link" href="{$entrylink}" title="{$CONST.VIEW}"><span class="icon-eye"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li>
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
<li><a class="icon_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=delete&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;{$urltoken}" onclick='return confirm("{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}")' title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li>
<li><a class="icon_link" onclick="cf = window.open(this.href, 'CommentForm', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1'); cf.focus(); return false;" href="?serendipity[action]=admin&amp;serendipity[adminModule]=comments&amp;serendipity[adminAction]=reply&amp;serendipity[id]={$comment.id}&amp;serendipity[entry_id]={$comment.entry_id}&amp;serendipity[noBanner]=true&amp;serendipity[noSidebar]=true&amp;{$urltoken}" title="{$CONST.REPLY}"><span class="icon-chat"></span><span class="visuallyhidden"> {$CONST.REPLY}</span></a></li>
Expand All @@ -211,7 +217,7 @@ function highlightComment(id, checkvalue) {
{/foreach}
</ul>
{/if}
<div class="multidelete_actions">
<div class="multidelete_actions form_buttons">
<input name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}" onclick="invertSelection()">
<input name="toggle" type="submit" value="{$CONST.DELETE_SELECTED_COMMENTS}" onclick="return confirm('{$CONST.COMMENTS_DELETE_CONFIRM}')" tabindex="{($i+1)}">
<input name="serendipity[togglemoderate]" type="submit" value="{$CONST.MODERATE_SELECTED_COMMENTS}">
Expand Down
39 changes: 29 additions & 10 deletions templates/2k11/admin/style.css
Expand Up @@ -647,7 +647,7 @@ input[type=checkbox] { margin-right: .4em; }
margin-right: 1em;
}

.form_buttons {
.form_buttons input {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
Expand Down Expand Up @@ -800,9 +800,23 @@ summary { cursor: pointer; }
.category_data,
.user_name, .group_name { min-width: 8em; }

.category_data { margin: 0 1em 0 0; }
.category_data {
margin: 0 1em 0 0;
width: 75%;
}

.category_desc { margin: 0 1em 0 0; }

/* Content area */
#serendipity_comments_list .form_check,
#serendipity_comments_list h4 { float: left; }

#serendipity_comments_list .actions { margin-top: .75em; }

#serendipity_comments_list .form_check { margin: 1.35em 0; }

.comment_data { margin-top: 0; }

.comment_data dt, .comment_data dd,
.template_info dt,
.template_info dd { float: left; }
Expand Down Expand Up @@ -854,7 +868,8 @@ summary { cursor: pointer; }
}

#edit_entry_title label,
#edit_entry_metadata label {
#edit_entry_metadata label,
#filter_comments label {
display: inline-block;
width: 15%;
}
Expand All @@ -873,12 +888,14 @@ summary { cursor: pointer; }
#edit_entry_title input { width: 84%; }

#edit_entry_metadata input,
#edit_entry_metadata select { width: 84%; }
#edit_entry_metadata select,
#filter_comments input,
#filter_comments select { width: 84%; }

.editor_toolbar input {
margin: 0 .25em .75em 0;
min-width: 4.25em;
}
.editor_toolbar input { margin: 0 .25em .75em 0; }

.editor_toolbar input,
.comment_data dt { min-width: 4.25em; }

#entries_list .form_check { float: left; }

Expand Down Expand Up @@ -1011,13 +1028,15 @@ summary { cursor: pointer; }
#edit_entry_metadata label,
#sort_entries .form_select label,
#filter_entries .form_select label,
#filter_entries .form_field label {
#filter_entries .form_field label,
#filter_comments label {
display: block;
width: auto;
}

#edit_entry_metadata>div,
#sort_entries .form_select {
#sort_entries .form_select,
#filter_comments .clearfix>div {
float: left;
width: 33% ;
}
Expand Down

0 comments on commit 2ea4159

Please sign in to comment.