Module:Sanctions: Difference between revisions

Content deleted Content added
Fixes dark mode e.g. Template:Gs/alert
Close added "p" tags
 
(3 intermediate revisions by 2 users not shown)
Line 141:
:css('font-size', '120%')
:wikitext("'''WARNING: ACTIVE COMMUNITY SANCTIONS'''")
:done()
end
 
if hasRestrictions then
out
:tag('p')
:wikitext("The article [[:{{SUBJECTPAGENAME}}]], along with other pages relating to "..topic:get('scope')..", is designated by the community as a '''[[Wikipedia:Contentious topics|contentious topic]]'''. The current restrictions are:")
Line 202 ⟶ 199:
 
local enforcementProcedures = mw.html.create('ul')
 
if hasRestrictions then
enforcementProcedures
:tag('li')
:wikitext("Violations of any restrictions " .. (hasRevertRestrictions and "(excluding 1RR/reverting violations) " or "") .. "and other conduct issues should be reported to the [[Wikipedia:Administrators' noticeboard/Incidents|administrators' incidents noticeboard]]." .. (hasRevertRestrictions and " Violations of revert restrictions should be reported to the [[Wikipedia:Administrators' noticeboard/Edit warring|administrators' edit warring noticeboard]]." or ""))
:done()
:tag('li')
:wikitext("Editors who violate any listed restrictions may be blocked by any uninvolved administrator, even on a first offense.")
:done()
else
enforcementProcedures
:tag('li')
:wikitext("Problems should be reported to the [[Wikipedia:Administrators' noticeboard/Incidents|administrators' incidents noticeboard]].")
:done()
end
 
enforcementProcedures
:tag('li')
:wikitext("Violations of any restrictions " .. (hasRevertRestrictions and "(excluding 1RR/reverting violations) " or "") .. "and other conduct issues should be reported to the [[Wikipedia:Administrators' noticeboard/Incidents|administrators' incidents noticeboard]]." .. (hasRevertRestrictions and " Violations of revert restrictions should be reported to the [[Wikipedia:Administrators' noticeboard/Edit warring|administrators' edit warring noticeboard]]." or ""))
:done()
:tag('li')
:wikitext("Editors who violate any listed restrictions may be blocked by any uninvolved administrator, even on a first offense.")
:done()
:tag('li')
:wikitext("An editor must be [[Wikipedia:Contentious topics#Awareness of contentious topics|aware]] before they can be sanctioned.")
Line 260 ⟶ 248:
 
local box = messageBox.main( 'tmbox', {
type = 'noticecontent',
image = type == 'long' and '[[File:Commons-emblem-issue.svg|50px]]' or '[[File:Commons-emblem-hand-orange.svg|40px]]',
text = frame:preprocess(tostring(out))
Line 274 ⟶ 262:
-- @returns String representation of notice
local function buildAlert(frame, topic, sig)
local hasRestrictions = topic:hasAnyRestrictions()
local restrictionIntro
local restrictionList
if hasRestrictions then
restrictionIntro = mw.html.create('p')
restrictionIntro:wikitext("Additionally, the following restriction(s) apply to this topic area:")
restrictionList = mw.html.create('ul')
if topic:hasRestriction('1rr') then
restrictionList
:tag('li')
:wikitext("All articles in this topic area are under [[Wikipedia:Edit warring#Other revert rules|WP:1RR]] (a limit of one [[Wikipedia:Reverting|revert]] per editor per article per 24-hour period). When in doubt, assume an edit is related and so is a revert. Clear vandalism of whatever origin may be reverted without restriction. Reverts of edits made by anonymous IP editors that are not vandalism are exempt from 1RR but are subject to the usual rules on edit warring. Editors who otherwise violate this 1RR restriction may be blocked without warning by any uninvolved administrator, even on a first offence.")
end
local customRestrictions = topic:getCustomRestrictions()
for _, v in ipairs(customRestrictions) do
restrictionList
:tag('li')
:newlinewikitext(v)
end
end
local out = mw.html.create('table')
:addClass('gs-alert')
Line 285 ⟶ 297:
:done()
:tag('td')
:tag('p')
:wikitext("This is a standard message to notify contributors about an administrative ruling in effect. ''It does '''not''' imply that there are any issues with your contributions to date.''")
:newline()
:done()
:wikitext("You have shown interest in ".. topic:get('scope') ..". Due to past disruption in this topic area, the community has authorised uninvolved administrators to impose [[Wikipedia:Contentious topics|contentious topics restrictions]]—such as [[Wikipedia:Editing restrictions#Types of restrictions|editing restrictions]], [[Wikipedia:Banning policy#Types of bans|bans]], or [[WP:Blocking policy|blocks]]—on editors who do not strictly follow [[Wikipedia:List of policies|Wikipedia's policies]], expected [[Wikipedia:Etiquette|standards of behaviour]], or the [[Wikipedia:Contentious topics#Standard set|page-specific restrictions]], when making edits related to the topic.")
:newlinetag('p')
:wikitext("You have shown interest in ".. topic:get('scope') ..". Due to past disruption in this topic area, the community has authorised uninvolved administrators to impose [[Wikipedia:Contentious topics|contentious topics restrictions]]—such as [[Wikipedia:Editing restrictions#Types of restrictions|editing restrictions]], [[Wikipedia:Banning policy#Types of bans|bans]], or [[WP:Blocking policy|blocks]]—on editors who do not strictly follow [[Wikipedia:List of policies|Wikipedia's policies]], expected [[Wikipedia:Etiquette|standards of behaviour]], or the [[Wikipedia:Contentious topics#Standard set|page-specific restrictions]], when making edits related to the topic.")
:wikitext("For additional information, please see the [[".. topic:get('wikilink') .."|guidance on these sanctions]]. If you have any questions, or any doubts regarding what edits are appropriate, you are welcome to discuss them with me or any other editor." .. (sig and ' '..sig or ''))
:done()
:node(restrictionIntro)
:node(restrictionList)
:tag('p')
:wikitext("For additional information, please see the [[".. topic:get('wikilink') .."|guidance on these sanctions]]. If you have any questions, or any doubts regarding what edits are appropriate, you are welcome to discuss them with me or any other editor." .. (sig and ' '..sig or ''))
:done()
 
return frame:preprocess(tostring(out))