comment "approved" renamed to "published"

This commit is contained in:
Katja Suess 2019-12-10 15:51:28 +01:00
parent 30490412ab
commit dfc21d1d5d
3 changed files with 26 additions and 19 deletions

View File

@ -221,21 +221,28 @@ require(["jquery", "pat-registry"], function($, registry) {
});
/**********************************************************************
* select comments with review_state
* Comments published: Load history for publishing date.
**********************************************************************/
$("input[name='review_state']").click(function() {
// location.search = 'review_state=' + $(this).val();
let review_state = $(this).val();
let url = location.href;
if (location.search) {
url = location.href.replace(
location.search,
"?review_state=" + review_state
);
} else {
url = location.href + "?review_state=" + review_state;
$(".last-history-entry").each(function() {
var me = $(this);
$.ajax({
url: me.attr("data-href"),
success: function (data) {
let first_history_entry = $(data).find(".historyByLine").first();
me.html("");
first_history_entry.children().each(function() {
me.append($(this));
me.append("<br/>");
});
// format date
registry.scan(me);
},
error: function (msg) {
alert("Error getting history.");
}
});
});
}; // end init
$("#review-comments").load(url + " #review-comments", function() {
init();

View File

@ -21,8 +21,8 @@ from zope.interface import alsoProvides
# Translations for generated values in buttons
# States
_('comment_pending', default='pending')
# _('comment_approved', default='approved')
_('comment_published', default='approved')
# _('comment_approved', default='published')
_('comment_published', default='published')
_('comment_rejected', default='rejected')
_('comment_spam', default='marked as spam')
# Transitions

View File

@ -36,7 +36,7 @@
<permission-role>Reviewer</permission-role>
</permission-map>
</state>
<state state_id="published" title="Approved">
<state state_id="published" title="Published">
<description>Visible to everyone, non-editable.</description>
<exit-transition transition_id="mark_as_spam"/>
<exit-transition transition_id="recall"/>