Allow upvoting own Q&A questions as an opt-in setting
The new Q&A setting allow_self_upvote (off by default) lets participants spend their upvote budget on their own questions, e.g. for prioritizing topics. Without it, participants now see a short hint why their own questions cannot be upvoted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec0b13cae8
commit
affc9a5ece
10 files changed
+59
-12
No files matched your search
@@ -1398,12 +1398,15 @@
|
||||
qaList.appendChild(el('p', { class: 'results-empty', text: 'Es wurden keine Fragen eingereicht.' }));
|
||||
return;
|
||||
}
|
||||
if (qa.mine.length && !qa.allowSelfUpvote) {
|
||||
qaList.appendChild(el('p', { class: 'hint', text: 'Deine eigenen Fragen kannst du nicht unterstützen – verteile deine Stimmen auf die Fragen der anderen.' }));
|
||||
}
|
||||
qaList.appendChild(el('ul', { class: 'qa-list' }, qa.questions.map(function (question) {
|
||||
var mine = qa.mine.indexOf(question.id) >= 0;
|
||||
// Own upvotes on this question – several are allowed to push important questions.
|
||||
var given = (qa.upvoted || {})[question.id] || 0;
|
||||
var action;
|
||||
if (mine) {
|
||||
if (mine && !qa.allowSelfUpvote) {
|
||||
action = el('span', { class: 'qa-own', text: 'deine Frage' });
|
||||
} else {
|
||||
var button = function (vote, symbol, label, disabled) {
|
||||
@@ -1430,7 +1433,7 @@
|
||||
]);
|
||||
}
|
||||
return el('li', { class: 'qa-item' + (mine ? ' is-mine' : '') + (given > 0 ? ' is-upvoted' : '') }, [
|
||||
el('span', { class: 'qa-item__text', text: question.text }),
|
||||
el('span', { class: 'qa-item__text', text: question.text + (mine && qa.allowSelfUpvote ? ' (deine Frage)' : '') }),
|
||||
action
|
||||
]);
|
||||
})));
|
||||
|
||||
Reference in new issue
Block a user