吃什么排黑色素最强| 亲额头代表什么意思| 爸爸的姥姥叫什么| 狗是什么时辰| 吃地屈孕酮片有什么副作用| 中国防御系统叫什么| 不是你撞的为什么要扶| 嘴唇有点发黑是什么原因引起的| 全身骨显像是查什么的| 泛滥成灾是什么意思| 来大姨妈量少是什么原因| 妮子什么意思| 腊排骨炖什么好吃| 刚字五行属什么| 农历六月十九是什么星座| 为什么要备孕| 刀伤用什么药愈合最快| 始祖鸟什么档次| 夏季热是什么病| 情绪低落是什么意思| 卵巢多囊是什么原因造成的| 男才女貌是什么意思| 烧头七有什么讲究| 食用葡萄糖是什么| 看见黄鼠狼有什么预兆| 铅是什么| sod什么意思| 妇科杆菌是什么引起的| 这个季节适合种什么菜| 红棕色是什么颜色| 桃子不能和什么水果一起吃| 可乐必妥是什么药| 甲状腺结节忌口什么| 高血压是什么意思| 与世隔绝的绝是什么意思| 静态纹用什么除皱| 失足是什么意思| 多囊卵巢有什么症状表现| 小腿骨头疼是什么原因| 泡饭为什么对胃不好| 痹症是什么意思| 一直耳鸣是什么原因引起的| 三月二十八号是什么星座| 身上起红疙瘩是什么| 什么是支原体感染| 胳膊肘发黑是什么原因| 煮酒论英雄什么意思| 葱长什么样| 龟头炎用什么药| 晚上吃什么能减肥| mrv是什么检查| 酸菜鱼加什么配菜好吃| 治疗阳痿早泄用什么药| 梦见自己流产了是什么征兆| 5月2日是什么星座| 对戒是什么意思| 胰腺不舒服是什么症状| warrior是什么牌子| 港澳通行证签注是什么意思| 为什么奢侈品都是pvc| 宜家宜室什么意思| 什么护肤品好用| 胎脂是什么原因造成的| 关节痛吃什么药| 心电图st段改变什么意思| 核黄素是什么| 牙痛吃什么药效果最好| 孕妇能喝什么茶| 脑梗前有什么预兆| 猫有什么特点| 吃完榴莲不能吃什么| 鬼见愁是什么意思| 副乳挂什么科| 妈妈最大的愿望是什么| 补血吃什么好| 低密度结节是什么意思| 儿时是什么意思| 梦见尸体是什么意思| siemens是什么品牌| 徒手是什么意思| 梦见母亲去世预示什么| 脑供血不足检查什么项目| 什么是地震| 淀粉酶高是什么原因| 榴莲树长什么样子图片| 用热毛巾敷眼睛有什么好处| 芊芊是什么意思| 坎坷是什么意思| 脂溶性是什么意思| 什么样的黄河| 什么帽不能戴| 大仙为什么知道你的事| 煤气罐为什么会爆炸| 胃不好能吃什么| icu病房是什么意思| 三伏贴能治什么病| 伤口不结痂是什么原因| 心凉是什么意思| 赴汤蹈火的汤是什么意思| 异常是什么意思| 男性尿频尿急吃什么药| 儿茶是什么中药| 脑震荡吃什么药| 血管疼是什么原因| gbm是什么意思| 藿香正气水什么牌子的好| 四叶草是什么意思| 怀孕了不想要最好的办法是什么| 浪琴名匠系列什么档次| 男人时间短吃什么药| 女性寒性体质喝什么茶| 化生细胞有是什么意思| 长期熬夜吃什么可以补回来| 一直流口水是什么原因| 为什么泡完脚后非常痒| l do是什么意思| 肌酸是什么东西| 人的牙齿为什么不能再生| 猪八戒的真名叫什么| 9月3号是什么日子| 旧衣服属于什么垃圾| 胃病能吃什么水果| 自缚是什么意思| 吃什么食物补肾| 身上痣多是什么原因| 四月二十八什么星座| 肩胛骨缝疼挂什么科| 涟漪是什么意思| 中指和无名指发麻是什么原因| 梦见小女孩是什么预兆| 睡觉中途总醒什么原因| 扁平疣是什么样子图片| 湿度大对人体有什么影响| 阴道润滑剂什么牌子好| 四时是什么时辰| 阿西吧什么意思| 瘖什么意思| 叶子发黄缺什么肥| 摸摸头是什么意思| 肾积水是什么原因造成的怎么治疗| 慢热型是什么意思| 什么的竹叶| 晟怎么读什么意思| 秦始皇的佩剑叫什么剑| 怀孕6个月吃什么好| 卵巢囊性包块是什么意思| 铜锣湾有什么好玩的| 注意力不集中是什么原因| 上海为什么叫魔都| 什么是唐氏综合征| 欣五行属什么| 时至今日是什么意思| 羊白是什么| 三七粉主治什么病| 什么是桥本氏甲状腺炎| 仰卧起坐是什么现象| 腰间盘突出是什么症状| 急性中耳炎吃什么药| 脾胃气虚吃什么中成药| 叶凡为什么要找荒天帝| 备孕什么意思| 什么是尊严| 私密瘙痒是什么原因| 中指和无名指发麻是什么原因| 胆固醇高是什么病| 一花一世界下一句是什么| 晚上八点多是什么时辰| 婴儿睡觉头上出汗多是什么原因| 过劳肥是什么意思| 腰脱是什么症状| 唐氏综合征是什么病| 梦见戴孝是什么意思| hpv初期有什么症状女性| 梦见水里有蛇是什么意思| 什么什么不舍| 尿浑浊是什么原因| 带状疱疹是什么病| 扁桃体结石长什么样| 丝字五行属什么| 世界上最长的单词是什么| iabp医学上是什么意思| 预防中暑喝什么水| 青海有什么湖| 肚子疼是为什么| 斯德哥尔摩综合症是什么| 女人喝枸杞水有什么好处| 石楠花什么味道| 无花果和什么煲汤好| hbsag阴性是什么意思| 尿隐血是什么原因| 什么颜色属木| 看见喜鹊有什么预兆| 肝在五行中属什么| 木隶念什么| 长高吃什么钙片| 40不惑什么意思| 什么是正装女士| 讳莫如深是什么意思| 脂肪酶是什么| 女字旁一个朱念什么| 脸跳动是什么原因| 奶篓子是什么意思| 月亏念什么| 妈妈的外婆叫什么| uspa是什么牌子| 什么东西补钙最好最快| 左边小腹疼是什么原因| 感恩节为什么要吃火鸡| 内热吃什么药| 新生儿嘴唇发紫是什么原因| 刻薄什么意思| 什么叫切片| 罗贯中是什么朝代的| 控制血糖吃什么食物| 新生儿不睡觉是什么原因| 4ever是什么意思| 喉咙肿痛吃什么药| 处变不惊是什么意思| 红色血痣是什么原因| 晚上十一点是什么时辰| 血常规五项能检查出什么病| 什么饮料好喝又健康| 中国四大发明是什么| 抑制素b检测是什么意思| 亚人是什么意思| 烧烤烤什么好吃| 治癜风擦什么药好的快| 梦见摘西红柿是什么意思| 美国是什么洲| 挚爱的意思是什么| 86年属什么的生肖| 羡煞旁人是什么意思| 7月25号是什么星座| 藿香正气水什么味道| 太原有什么特产| 螳螂捕蝉黄雀在后是什么意思| 高胰岛素血症是什么病| 痞气是什么意思| 小狗能吃什么水果| 忌行丧是什么意思| 肺部不好有什么症状| 清明节一般开什么生肖| 人流后吃什么药| 弯脚杆是什么意思| 70年产权是从什么时候开始算| 冒虚汗是什么原因| 为什么科比叫黑曼巴| 道和集团是干什么的| 长豆角叫什么| 平胸是什么原因导致的怎样解决| 什么克木| 奇异果和猕猴桃有什么区别| 血型b型rh阳性是什么意思| 25属什么生肖| 什么发型适合自己| c反应蛋白是什么| 什么颜色的衣服最防晒| 什么症状吃肝胃气痛片| 士官是什么| #NAME?| 出尔反尔是什么意思| 吃什么容易怀女儿| 点石成金是什么意思| 喝酒过敏吃什么药| 百度Jump to content

江西芦溪:将“救济式”扶贫转化为“开发式”扶贫

Permanently protected module
From Wikipedia, the free encyclopedia

local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')

local p = {}

local listTypes = {
	['bulleted'] = true,
	['unbulleted'] = true,
	['horizontal'] = true,
	['ordered'] = true,
	['horizontal_ordered'] = true
}

function p.makeListData(listType, args)
	-- Constructs a data table to be passed to p.renderList.
	local data = {}

	-- Classes and TemplateStyles
	data.classes = {}
	data.templatestyles = ''
	if listType == 'horizontal' or listType == 'horizontal_ordered' then
		table.insert(data.classes, 'hlist')
		data.templatestyles = mw.getCurrentFrame():extensionTag{
			name = 'templatestyles', args = { src = 'Hlist/styles.css' }
		}
	elseif listType == 'unbulleted' then
		table.insert(data.classes, 'plainlist')
		data.templatestyles = mw.getCurrentFrame():extensionTag{
			name = 'templatestyles', args = { src = 'Plainlist/styles.css' }
		}
	end
	table.insert(data.classes, args.class)

	-- Main div style
	data.style = args.style

	-- Indent for horizontal lists
	if listType == 'horizontal' or listType == 'horizontal_ordered' then
		local indent = tonumber(args.indent)
		indent = indent and indent * 1.6 or 0
		if indent > 0 then
			data.marginLeft = indent .. 'em'
		end
	end
	
	-- List style types for ordered lists
	-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
	-- type is either set by the "type" attribute or the "list-style-type" CSS
	-- property.
	if listType == 'ordered' or listType == 'horizontal_ordered' then 
		data.listStyleType = args.list_style_type or args['list-style-type']
		data.type = args['type']

		-- Detect invalid type attributes and attempt to convert them to
		-- list-style-type CSS properties.
		if data.type 
			and not data.listStyleType
			and not tostring(data.type):find('^%s*[1AaIi]%s*$')
		then
			data.listStyleType = data.type
			data.type = nil
		end
	end
	
	-- List tag type
	if listType == 'ordered' or listType == 'horizontal_ordered' then
		data.listTag = 'ol'
	else
		data.listTag = 'ul'
	end

	-- Start number for ordered lists
	data.start = args.start
	if listType == 'horizontal_ordered' then
		-- Apply fix to get start numbers working with horizontal ordered lists.
		local startNum = tonumber(data.start)
		if startNum then
			data.counterReset = 'listitem ' .. tostring(startNum - 1)
		end
	end

	-- List style
	 -- ul_style and ol_style are included for backwards compatibility. No
	 -- distinction is made for ordered or unordered lists.
	data.listStyle = args.list_style

	-- List items
	-- li_style is included for backwards compatibility. item_style was included
	-- to be easier to understand for non-coders.
	data.itemStyle = args.item_style or args.li_style
	data.items = {}
	for _, num in ipairs(mTableTools.numKeys(args)) do
		local item = {}
		item.content = args[num]
		item.style = args['item' .. tostring(num) .. '_style']
			or args['item_style' .. tostring(num)]
		item.value = args['item' .. tostring(num) .. '_value']
			or args['item_value' .. tostring(num)]
		table.insert(data.items, item)
	end
	
	return data
end

function p.renderList(data)
	-- Renders the list HTML.
	
	-- Return the blank string if there are no list items.
	if type(data.items) ~= 'table' or #data.items < 1 then
		return ''
	end
	
	-- Render the main div tag.
	local root = mw.html.create('div')
	for _, class in ipairs(data.classes or {}) do
		root:addClass(class)
	end
	root:css{['margin-left'] = data.marginLeft}
	if data.style then
		root:cssText(data.style)
	end

	-- Render the list tag.
	local list = root:tag(data.listTag or 'ul')
	list
		:attr{start = data.start, type = data.type}
		:css{
			['counter-reset'] = data.counterReset,
			['list-style-type'] = data.listStyleType
		}
	if data.listStyle then
		list:cssText(data.listStyle)
	end

	-- Render the list items
	for _, t in ipairs(data.items or {}) do
		local item = list:tag('li')
		if data.itemStyle then
			item:cssText(data.itemStyle)
		end
		if t.style then
			item:cssText(t.style)
		end
		item
			:attr{value = t.value}
			:wikitext(t.content)
	end

	return data.templatestyles .. tostring(root)
end

function p.renderTrackingCategories(args)
	local isDeprecated = false -- Tracks deprecated parameters.
	for k, v in pairs(args) do
		k = tostring(k)
		if k:find('^item_style%d+$') or k:find('^item_value%d+$') then
			isDeprecated = true
			break
		end
	end
	local ret = ''
	if isDeprecated then
		ret = ret .. '[[Category:List templates with deprecated parameters]]'
	end
	return ret
end

function p.makeList(listType, args)
	if not listType or not listTypes[listType] then
		error(string.format(
			"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
			tostring(listType)
		), 2)
	end
	checkType('makeList', 2, args, 'table')
	local data = p.makeListData(listType, args)
	local list = p.renderList(data)
	local trackingCategories = p.renderTrackingCategories(args)
	return list .. trackingCategories
end

for listType in pairs(listTypes) do
	p[listType] = function (frame)
		local mArguments = require('Module:Arguments')
		local origArgs = mArguments.getArgs(frame, {
			frameOnly = ((frame and frame.args and frame.args.frameonly or '') ~= ''),
			valueFunc = function (key, value)
			if not value or not mw.ustring.find(value, '%S') then return nil end
			if mw.ustring.find(value, '^%s*[%*#;:]') then
				return value
			else
				return value:match('^%s*(.-)%s*$')
			end
			return nil
		end
		})
		-- Copy all the arguments to a new table, for faster indexing.
		local args = {}
		for k, v in pairs(origArgs) do
			args[k] = v
		end
		return p.makeList(listType, args)
	end
end

return p
长个子需要补充什么 牛皮革是什么意思 省委巡视组组长什么级别 大什么什么什么成语 肉桂茶属于什么茶
911是什么电话 什么是雌激素 大便恶臭是什么原因 晚上剪指甲有什么禁忌 蛇胆疮是什么原因引起的
一个火一个丙念什么 逆行是什么意思 今年85岁属什么生肖 胖子从12楼掉下来会变什么 工业氧气和医用氧气有什么区别
神的国和神的义指的是什么 头皮发痒用什么洗发水 辛辣指的是什么 尿等待吃什么药最好 重睑术是什么意思
4月27日是什么星座hcv8jop9ns6r.cn 负氧离子是什么hcv8jop9ns1r.cn 高血压的人不能吃什么wzqsfys.com 奥美拉唑是治什么病的hcv9jop5ns4r.cn pin什么意思hcv8jop1ns7r.cn
下气是什么意思hcv9jop6ns6r.cn 7.1什么星座jasonfriends.com 梦见着火是什么预兆mmeoe.com 胃溃疡适合吃什么食物hcv8jop7ns4r.cn 幼犬拉稀吃什么药最好hcv8jop7ns5r.cn
地中海贫血有什么影响weuuu.com 为什么支气管炎咳嗽长期不好hcv9jop1ns2r.cn 思密达韩语是什么意思hcv8jop3ns3r.cn 国企混改是什么意思hcv9jop7ns0r.cn 手腕痛什么原因hcv9jop1ns4r.cn
中子是什么hcv7jop9ns5r.cn 吃完避孕药有什么反应hcv8jop2ns9r.cn 梦见一个人死了是什么意思hcv8jop2ns9r.cn 晚上八点多是什么时辰hcv9jop2ns1r.cn 血压低吃什么补hcv8jop0ns8r.cn
百度