Jump to content

Module:Probox/Inspire Campaign/Measuring community health

From Meta, a Wikimedia project coordination wiki
Module documentation

local m = {}
m.styles = {}
m.sections = {}
m.fields = {}
m.categories = {} 
m.roles = {}

m.roles.contact = true
m.roles.creator = true
m.roles.volunteer = true
m.roles.advisor = true
m.roles.designer = true
m.roles.developer = true
m.roles.project_manager = true
m.roles.community_organizer = true
m.roles.researcher = true
m.roles.grantee = true
m.roles.default = "volunteer"

m.sections.above = true
m.sections.nav = true
m.sections.head = true
m.sections.main = true
m.sections.participants = true
m.sections.cta = true
m.sections.below = true

m.styles.box = {}
m.styles.box.outer = "float:right; margin: 0 0 1em 4%; min-width: 22em; width: 28%;"
m.styles.box.inner = "background-color: #eeeeee; color: #000000; border-left: 1px solid #ddd; border-top: 1px solid #ddd; border-right: 1px solid #ddd; border-bottom: 3px solid #D0D0D0; border-radius: 1px; padding: 12px 20px 20px 20px;"

m.styles.section = {}
m.styles.section.above = ""
m.styles.section.nav = "background-color: #0CAC0C; padding: .25em 0 .25em 1em; font-size: 1.3em"
m.styles.section.head = "margin-bottom:1em;"
m.styles.section.main = "margin-bottom:1em;"
m.styles.section.participants = "background-color:white; border: 1px solid #DDD; border-radius: 1px; margin-bottom:.5em; padding:.75em;"
m.styles.section.cta = "clear:both;"
m.styles.section.below = ""

m.styles.field = {}
m.styles.field.h1 = "display:inline; word-wrap:break-word;"
m.styles.field.h2 = "margin-bottom:0.5em; word-wrap:break-word;"
m.styles.field.p = ""
m.styles.field.img = ""

--
-- fields
--

-- above box

m.fields.status = {}
m.fields.status.isRequired = false
m.fields.status.toLowerCase = true
m.fields.status.vtype = "text"
m.fields.status.vtype2 = "body"
m.fields.status.style = ""
m.fields.status.style2 = "font-style:italic; padding-right:.5em; color: #888888"
m.fields.status.style3 = "font-weight:bold"
m.fields.status.section = "above"
m.fields.status.arg = "status"
m.fields.status.key = "status"
m.fields.status.rank = 1

-- nav section
m.fields.nav_icon = {}
m.fields.nav_icon.isRequired = true
m.fields.nav_icon.vtype = "image"
m.fields.nav_icon.vtype2 = "link"
m.fields.nav_icon.style = "display:inline; padding-right:.25em; padding-bottom:.30em; padding-top:.30em;"
m.fields.nav_icon.style2 = ""
m.fields.nav_icon.style3 = ""
m.fields.nav_icon.section = "nav"
m.fields.nav_icon.width = "35px"
m.fields.nav_icon.alignment = "middle"
m.fields.nav_icon.arg = "nav_icon"
m.fields.nav_icon.default = "File:Red heart with heartbeat logo.svg"
m.fields.nav_icon.key = ""
m.fields.nav_icon.link = "Grants:IdeaLab/Inspire"
m.fields.nav_icon.rank = 1

m.fields.nav_text = {}
m.fields.nav_text.isRequired = true
m.fields.nav_text.vtype = "text"
m.fields.nav_text.vtype2 = "link"
m.fields.nav_text.style = m.styles.field.h1
m.fields.nav_text.style2 = "color:#FFFFFF"
m.fields.nav_text.style3 = ""
m.fields.nav_text.section = "nav"
m.fields.nav_text.arg = "nav_text"
m.fields.nav_text.default = "Grants:IdeaLab/Inspire"
m.fields.nav_text.key = "portal-inspire"
m.fields.nav_text.rank = 2

-- head section
m.fields.project = {}
m.fields.project.isRequired = true
m.fields.project.vtype = "text"
m.fields.project.vtype2 = "title"
m.fields.project.style = m.styles.field.h1
m.fields.project.style2 = ""
m.fields.project.style3 = "font-size: 1.3em;"
m.fields.project.section = "head"
m.fields.project.arg = "project"
m.fields.project.key = ""
m.fields.project.default = "title-default"
m.fields.project.rank = 2

m.fields.image = {}
m.fields.image.isRequired = false
m.fields.image.vtype = "image"
m.fields.image.vtype2 = "thumb"
m.fields.image.style = ""
m.fields.image.style2 = ""
m.fields.image.style3 = "float:right;"
m.fields.image.section = "head"
m.fields.image.arg = "image"
m.fields.image.key = ""
m.fields.image.width = "50px"
m.fields.image.rank = 1

-- main section
m.fields.summary = {}
m.fields.summary.isRequired = true
m.fields.summary.vtype = "text"
m.fields.summary.vtype2 = "body"
m.fields.summary.style = m.styles.field.h2
m.fields.summary.style2 = "color: #888888; font-style: italic;"
m.fields.summary.style3 = "display:block;"
m.fields.summary.section = "main"
m.fields.summary.arg = "summary"
m.fields.summary.key = ""
m.fields.summary.default = "summary-default"
m.fields.summary.rank = 1

-- new
m.fields.amount = {}
m.fields.amount.isRequired = false
m.fields.amount.vtype = "text"
m.fields.amount.vtype2 = "body"
m.fields.amount.style = m.styles.field.h2
m.fields.amount.style2 = "color: #888888; font-style: italic;"
m.fields.amount.style3 = "display:block;"
m.fields.amount.section = "main"
m.fields.amount.arg = "amount"
m.fields.amount.key = "amount"
m.fields.amount.default = "amount-default"
m.fields.amount.rank = 2

m.fields.contact = {}
m.fields.contact.isRequired = false
m.fields.contact.vtype = "text"
m.fields.contact.vtype2 = "body"--why is this body not email as for participants below
m.fields.contact.style = m.styles.field.h2
m.fields.contact.style2 = "color: #888888; font-style: italic;"
m.fields.contact.style3 = "display:block;"
m.fields.contact.section = "main"
m.fields.contact.arg = "contact"
m.fields.contact.key = "contact"
m.fields.contact.rank = 3

m.fields.country = {}
m.fields.country.isRequired = false
m.fields.country.vtype = "text"
m.fields.country.vtype2 = "body"
m.fields.country.style = m.styles.field.h2
m.fields.country.style2 = "color: #888888; font-style: italic;"
m.fields.country.style3 = "display:block;"
m.fields.country.section = "main"
m.fields.country.arg = "country"
m.fields.country.key = "country"
m.fields.country.rank = 4

m.fields.inspire_theme = {}
m.fields.inspire_theme.isRequired = false
m.fields.inspire_theme.vtype = "text"
m.fields.inspire_theme.vtype2 = "body"
m.fields.inspire_theme.style = m.styles.field.h2
m.fields.inspire_theme.style2 = "color: #888888; font-style: italic;"
m.fields.inspire_theme.style3 = "display:block;"
m.fields.inspire_theme.section = "main"
m.fields.inspire_theme.arg = "theme"
m.fields.inspire_theme.key = "theme"
m.fields.inspire_theme.rank = 5

--participants section
m.fields.more_participants = {}
m.fields.more_participants.key = "more-participants"

m.fields.grantee = {}
m.fields.grantee.isRequired = false
m.fields.grantee.vtype = "participant"
m.fields.grantee.vtype2 = "username"
m.fields.grantee.style = m.styles.field.h2
m.fields.grantee.style2 = ""
m.fields.grantee.style3 = "display:block;"
m.fields.grantee.section = "participants"
m.fields.grantee.arg = "grantee"
m.fields.grantee.key = "grantee"
m.fields.grantee.rank = 1

m.fields.contact = {}
m.fields.contact.isRequired = false
m.fields.contact.vtype = "participant"
m.fields.contact.vtype2 = "email"--maybe add icon for contact
m.fields.contact.style = m.styles.field.h2
m.fields.contact.style2 = ""
m.fields.contact.style3 = "display:block;"
m.fields.contact.section = "participants"
m.fields.contact.arg = "contact"
m.fields.contact.key = "contact"
m.fields.contact.rank = 2

m.fields.creator = {}
m.fields.creator.isRequired = false
m.fields.creator.vtype = "participant"--why not have vtype2 for all these participant roles too
m.fields.creator.icon = "File:Hex_icon_with_lightning_white.svg"
m.fields.creator.icon_inactive = "File:Hex_icon_with_lightning_black.svg"
m.fields.creator.style = m.styles.field.h2
m.fields.creator.style2 = ""
m.fields.creator.style3 = "display:block;"
m.fields.creator.section = "participants"
m.fields.creator.arg = "creator"
m.fields.creator.key = "creator"
m.fields.creator.rank = 3

m.fields.project_manager = {}
m.fields.project_manager.isRequired = false
m.fields.project_manager.vtype = "participant"
m.fields.project_manager.icon = "File:Hex_icon_with_star_white.svg"
m.fields.project_manager.icon_inactive = "File:Hex_icon_with_star_black.svg"
m.fields.project_manager.style = m.styles.field.h2
m.fields.project_manager.style2 = ""
m.fields.project_manager.style3 = "display:block;"
m.fields.project_manager.section = "participants"
m.fields.project_manager.arg = "project_manager"
m.fields.project_manager.key = "project-manager"
m.fields.project_manager.rank = 4

m.fields.community_organizer = {}
m.fields.community_organizer.isRequired = false
m.fields.community_organizer.vtype = "participant"
m.fields.community_organizer.icon = "File:Hex_icon_with_bee_white.svg"
m.fields.community_organizer.icon_inactive = "File:Hex_icon_with_bee_black.svg"
m.fields.community_organizer.style = m.styles.field.h2
m.fields.community_organizer.style2 = ""
m.fields.community_organizer.style3 = "display:block;"
m.fields.community_organizer.section = "participants"
m.fields.community_organizer.arg = "community_organizer"
m.fields.community_organizer.key = "community-organizer"
m.fields.community_organizer.rank = 5

m.fields.researcher = {}
m.fields.researcher.isRequired = false
m.fields.researcher.vtype = "participant"
m.fields.researcher.icon = "File:Hex_icon_with_flask_white.svg"
m.fields.researcher.icon_inactive = "File:Hex_icon_with_flask_black.svg"
m.fields.researcher.style = m.styles.field.h2
m.fields.researcher.style2 = ""
m.fields.researcher.style3 = "display:block;"
m.fields.researcher.section = "participants"
m.fields.researcher.arg = "researcher"
m.fields.researcher.key = "researcher"
m.fields.researcher.rank = 6

m.fields.designer = {}
m.fields.designer.isRequired = false
m.fields.designer.vtype = "participant"
m.fields.designer.icon = "File:Hex_icon_with_circles_white.svg"
m.fields.designer.icon_inactive = "File:Hex_icon_with_circles_black.svg"
m.fields.designer.style = m.styles.field.h2
m.fields.designer.style2 = ""
m.fields.designer.style3 = "display:block;"
m.fields.designer.section = "participants"
m.fields.designer.arg = "designer"
m.fields.designer.key = "designer"
m.fields.designer.rank = 7

m.fields.developer = {}
m.fields.developer.isRequired = false
m.fields.developer.vtype = "participant"
m.fields.developer.icon = "File:Hex_icon_with_hexes_white.svg"
m.fields.developer.icon_inactive = "File:Hex_icon_with_hexes_black.svg"
m.fields.developer.style = m.styles.field.h2
m.fields.developer.style2 = ""
m.fields.developer.style3 = "display:block;"
m.fields.developer.section = "participants"
m.fields.developer.arg = "developer"
m.fields.developer.key = "developer"
m.fields.developer.rank = 8

m.fields.advisor = {}
m.fields.advisor.isRequired = false
m.fields.advisor.vtype = "participant"
m.fields.advisor.icon = "File:Hex_icon_with_fire_white.svg"
m.fields.advisor.icon_inactive = "File:Hex_icon_with_lightning_black.svg"
m.fields.advisor.style = m.styles.field.h2
m.fields.advisor.style2 = ""
m.fields.advisor.style3 = "display:block;"
m.fields.advisor.section = "participants"
m.fields.advisor.arg = "advisor"
m.fields.advisor.key = "advisor"
m.fields.advisor.rank = 9

m.fields.volunteer = {}
m.fields.volunteer.isRequired = false
m.fields.volunteer.vtype = "participant"
m.fields.volunteer.icon = "File:Hex_icon_with_hand_white.svg"
m.fields.volunteer.icon_inactive = "File:Hex_icon_with_hand_black.svg"
m.fields.volunteer.style = m.styles.field.h2
m.fields.volunteer.style2 = ""
m.fields.volunteer.style3 = "display:block;"
m.fields.volunteer.section = "participants"
m.fields.volunteer.arg = "volunteer"
m.fields.volunteer.key = "volunteer"
m.fields.volunteer.rank = 10

-- call to action section (buttons, etc)
m.fields.talk = {}
m.fields.talk.isRequired = true
m.fields.talk.vtype = "text"
m.fields.talk.vtype2 = "link"
m.fields.talk.style = "display: inline; float:left; margin-right: 1em; margin-top: .5em"
m.fields.talk.style2 = ""
m.fields.talk.style3 = ""
m.fields.talk.section = "cta"
m.fields.talk.arg = "talk"
m.fields.talk.key = "talk"
m.fields.talk.rank = 1

m.fields.join = {}
m.fields.join.isRequired = true
m.fields.join.vtype = "image"
m.fields.join.vtype2 = "ui_button"
m.fields.join.style = "display:inline; float:right;"
m.fields.join.style2 = ""
m.fields.join.style3 = ""
m.fields.join.class = "wp-join-button mw-ui-button mw-ui-progressive"
m.fields.join.section = "cta"
m.fields.join.arg = "join"
m.fields.join.key = "join"
m.fields.join.rank = 2

-- Need to either remove this or have it direct folks to the idea talk page to endorse.
m.fields.endorse = {}
m.fields.endorse.isRequired = true
m.fields.endorse.vtype = "image"
m.fields.endorse.vtype2 = "ui_button"
m.fields.endorse.style = "display:inline; float:right; margin-right: 1em;"
m.fields.endorse.style2 = ""
m.fields.endorse.style3 = ""
m.fields.endorse.class = "wp-endorse-button mw-ui-button mw-ui-progressive"
m.fields.endorse.section = "cta"
m.fields.endorse.arg = "endorse"
m.fields.endorse.key = "endorse"
m.fields.endorse.rank = 3

-- below box
m.fields.timestamp = {}
m.fields.timestamp.isRequired = false
m.fields.timestamp.vtype = "text"
m.fields.timestamp.vtype2 = "body"
m.fields.timestamp.style = "font-style: italic; font-size: .75em"
m.fields.timestamp.style2 = "margin-right: .25em"
m.fields.timestamp.style3 = ""
m.fields.timestamp.section = "below"
m.fields.timestamp.arg = "timestamp"
m.fields.timestamp.key = "timestamp"
m.fields.timestamp.rank = 1

--
-- categories
--
m.categories.base = "Category:IdeaLab/Ideas/"
m.categories.roles = "/Wanted"
m.categories.default = "Category:IdeaLab/Ideas/Inspire]] [[Category:IdeaLab/Ideas/Inspire/Measuring community health"

m.categories.inspire_theme = {}
m.categories.inspire_theme.not_sure = "Uncategorized"
m.categories.inspire_theme.administration = "Administration"
m.categories.inspire_theme.demographics = "Demographics"
m.categories.inspire_theme.personal_experience = "Personal experience"
m.categories.inspire_theme.editing_statistics = "Editing statistics"
m.categories.inspire_theme.social_factors = "Social factors"
m.categories.inspire_theme.technical_access = "Technical access"
m.categories.inspire_theme.offwiki_factors = "Off-wiki factors"
m.categories.inspire_theme.other = "Community health/Other"

m.categories.status = {}
m.categories.status.proposed = "Proposal"
m.categories.status.ineligible = "Proposal/Ineligible"
m.categories.status.under_review = "Proposal/Review"
m.categories.status.completed = "Proposal/Completed"
m.categories.status.not_selected = "Proposal/Not_selected"
m.categories.status.selected = "Proposal/Selected"
m.categories.status.withdrawn = "Proposal/Withdrawn"

return m