Module:Probox/OSMKeralaBoosterGrant

From OpenStreetMap Wiki
Jump to navigation Jump to search
[Create] Documentation
local m = {}
m.styles = {}
m.sections = {}
m.fields = {}
m.categories = {} 
m.templates = {}
m.roles = {}

m.roles.grantee = true
m.roles.contact = true
m.roles.organization = true
m.roles.links = true
m.roles.default = "grantee"

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: #AA1C71; padding: .25em 0 0 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 = ""
m.styles.field.h2 = "margin-bottom:0.5em;"
m.styles.field.p = ""
m.styles.field.img = ""

--
-- fields
--

-- above box
m.fields.status = {}
m.fields.status.isRequired = 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.default = "status-default"
m.fields.status.rank = 1

-- nav section
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 = "display:inline;"
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 = "Booster grant"
m.fields.nav_text.key = "portal"
m.fields.nav_text.rank = 1

-- head section
m.fields.project = {}
m.fields.project.isRequired = true
m.fields.project.vtype = "text"
m.fields.project.vtype2 = "title"
m.fields.project.style = "display:inline;" 
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

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

-- Removing goal from probox field for now (is currently part of application outside of probox)
-- m.fields.goal = {}
-- m.fields.goal.isRequired = true
-- m.fields.goal.vtype = "text"
-- m.fields.goal.vtype2 = "body"
-- m.fields.goal.style = m.styles.field.h2
-- m.fields.goal.style2 = "color: #888888; font-style: italic;"
-- m.fields.goal.style3 = "display:block;"
-- m.fields.goal.section = "main"
-- m.fields.goal.arg = "goal"
-- m.fields.goal.key = "goal"
-- m.fields.goal.default = "goal-default"
-- m.fields.goal.rank = 3

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

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

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

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

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

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

m.fields.amount = {}
m.fields.amount.isRequired = true
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 = 9

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

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

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

--sub-section
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"
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.osm_username = {}
m.fields.osm_username.isRequired = false
m.fields.osm_username.vtype = "participant"
m.fields.osm_username.vtype2 = "email"
m.fields.osm_username.style = m.styles.field.h2
m.fields.osm_username.style2 = ""
m.fields.osm_username.style3 = "display:block;"
m.fields.osm_username.section = "participants"
m.fields.osm_username.arg = "osm_username"
m.fields.osm_username.key = "osm_username"
m.fields.osm_username.rank = 3

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

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

-- 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.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 = 2

-- below box
m.fields.timestamp = {}
m.fields.timestamp.isRequired = false
m.fields.timestamp.vtype = "text"
m.fields.timestamp.vtype2 = "body"
m.fields.timestamp.style = "display:inline; 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

-- 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

-- 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

-- Removing browse all existing applications
-- m.fields.index = {}
-- m.fields.index.isRequired = true
-- m.fields.index.vtype = "text"
-- m.fields.index.vtype2 = "link"
-- m.fields.index.width = "25px"
-- m.fields.index.alignment = "top"
-- m.fields.index.style = ""
-- m.fields.index.style2 = ""
-- m.fields.index.style3 = ""
-- m.fields.index.section = "below"
-- m.fields.index.arg = "index"
-- m.fields.index.default = "Grants:Project/Rapid/Browse_applications"
-- m.fields.index.key = "index"
-- m.fields.index.rank = 3

--
-- categories
--
m.categories.default = "Category:HOTBoosterGrant2023/Proposals"
m.categories.base = "Category:HOTBoosterGrant2023/Proposals"

m.categories.status = {}
m.categories.status.draft = "/Draft"
m.categories.status.proposed = "/Proposed"
m.categories.status.ineligible = "/Ineligible"
m.categories.status.selected = "/Selected"
m.categories.status.funded = "/Funded"
m.categories.status.not_funded = "/Not_funded"
m.categories.status.withdrawn = "/Withdrawn"
m.categories.status.completed = "/Completed"

m.categories.goal = {}
m.categories.goal.tutorials_and_training = "/Tutorials_and_Training_materials"
m.categories.goal.standardisations = "/Standardisations and Data Quality"
m.categories.goal.use_case = "/Use Case Building and Data Usability" 
m.categories.goal.mapathons = "/Mapathons" 
m.categories.goal.travel = "/Travel Grants"

m.categories.idealab = {}
m.categories.idealab.yes = "/IdeaLab"

--
-- navigation templates
--
-- m.templates.args = {}
-- m.templates.args.date = "2023-24"
-- m.templates.args.status = "2023-24"

 m.templates.passArg = true
 m.templates.status = {} -- add nav template to top, based on proposal status
 -- m.templates.status.status = "Rapid_Grants_request_probox"
-- m.templates.status.open = "Rapid_Grants_request_request/Open"
-- m.templates.status.funded = "Rapid_Grants_request_request/Funded"
-- m.templates.status.not_funded = "Rapid_Grants_request_request/Not_funded"
-- m.templates.status.withdrawn = "Rapid_Grants_request_request/Withdrawn"
-- m.templates.status.selected = "Rapid_Grants_request_request/Selected"
-- m.templates.status.cancelled = "Rapid_Grants_request/Cancelled"
-- m.templates.status.draft = "Rapid_Grants_request/Draft"
-- m.templates.status.open = "Rapid_Grants_Support_request/Open"
-- m.templates.status.funded = "Rapid_Grants_request/Funded"
-- m.templates.status.not_funded = "Rapid_Grants_request/Not_funded"
-- m.templates.status.withdrawn = "Rapid_Grants_request/Withdrawn"
-- m.templates.status.args = {}
-- m.templates.status.args.status = ""
-- m.templates.status.args.fiscal_year = ""

return m