comment "approved" renamed to "published"
This commit is contained in:
parent
30490412ab
commit
dfc21d1d5d
@ -221,21 +221,28 @@ require(["jquery", "pat-registry"], function($, registry) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* select comments with review_state
|
* Comments published: Load history for publishing date.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
$(".last-history-entry").each(function() {
|
||||||
$("input[name='review_state']").click(function() {
|
var me = $(this);
|
||||||
// location.search = 'review_state=' + $(this).val();
|
$.ajax({
|
||||||
let review_state = $(this).val();
|
url: me.attr("data-href"),
|
||||||
let url = location.href;
|
success: function (data) {
|
||||||
if (location.search) {
|
let first_history_entry = $(data).find(".historyByLine").first();
|
||||||
url = location.href.replace(
|
me.html("");
|
||||||
location.search,
|
first_history_entry.children().each(function() {
|
||||||
"?review_state=" + review_state
|
me.append($(this));
|
||||||
);
|
me.append("<br/>");
|
||||||
} else {
|
});
|
||||||
url = location.href + "?review_state=" + review_state;
|
// format date
|
||||||
|
registry.scan(me);
|
||||||
|
},
|
||||||
|
error: function (msg) {
|
||||||
|
alert("Error getting history.");
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}; // end init
|
||||||
|
|
||||||
$("#review-comments").load(url + " #review-comments", function() {
|
$("#review-comments").load(url + " #review-comments", function() {
|
||||||
init();
|
init();
|
||||||
|
@ -21,8 +21,8 @@ from zope.interface import alsoProvides
|
|||||||
# Translations for generated values in buttons
|
# Translations for generated values in buttons
|
||||||
# States
|
# States
|
||||||
_('comment_pending', default='pending')
|
_('comment_pending', default='pending')
|
||||||
# _('comment_approved', default='approved')
|
# _('comment_approved', default='published')
|
||||||
_('comment_published', default='approved')
|
_('comment_published', default='published')
|
||||||
_('comment_rejected', default='rejected')
|
_('comment_rejected', default='rejected')
|
||||||
_('comment_spam', default='marked as spam')
|
_('comment_spam', default='marked as spam')
|
||||||
# Transitions
|
# Transitions
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<permission-role>Reviewer</permission-role>
|
<permission-role>Reviewer</permission-role>
|
||||||
</permission-map>
|
</permission-map>
|
||||||
</state>
|
</state>
|
||||||
<state state_id="published" title="Approved">
|
<state state_id="published" title="Published">
|
||||||
<description>Visible to everyone, non-editable.</description>
|
<description>Visible to everyone, non-editable.</description>
|
||||||
<exit-transition transition_id="mark_as_spam"/>
|
<exit-transition transition_id="mark_as_spam"/>
|
||||||
<exit-transition transition_id="recall"/>
|
<exit-transition transition_id="recall"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user