跳转到内容
打开/关闭搜索
搜索
打开/关闭菜单
389
文件
1
用户
6091
编辑
Gal中文百科
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
在其他项目中
打开/关闭外观设置菜单
无法加载偏好设置。请检查您的网络连接并重试。
重试
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
讨论
贡献
创建账号
登录
编辑“︁
Module
:
Table empty cell
”︁
来自Gal中文百科
查看
阅读
编辑源代码
查看历史
associated-pages
模块
讨论
更多操作
更多
工具
链入页面
相关更改
页面信息
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
local p = {} -- List of default title texts. local defaultTitleTextlist = { ["TBA"] = "待公布", ["TBD"] = "待定", ["N/A"] = "不适用", ["待公布"] = "表格内此处信息尚未公开或尚未正式发布。", ["待定"] = "表格内此处信息仍不确定。", ["不适用"] = "表格内此处不适用。" } -- Local function which is used to retrieve the title text. local function getTitleText(args, altText) local titleText = args[2] or args["title_text"] -- If the title text was manually added, return it. if (titleText) then return titleText end -- The title text was not set, get the correct default text which corresponds to the alt text. for k, v in pairs(defaultTitleTextlist) do if (altText == k) then return v end end end -- Local function which is used to retrieve the alt text. local function getAltText(args) local altText = args[1] or args["alt_text"] if (altText == nil) then altText = "待公布" end return altText end -- Local function which does the actual main process. function p._main(args) local altText = getAltText(args) local titleText = getTitleText(args, altText) return "<small style=\"color: #2C2C2C\" title=\"" .. titleText .. "\">" .. altText .. "</small>" end --[[ Public function which is used to create information for an empty text cell. Parameters: -- |1= or |alt_text= — optional; The text which will be written in the cell. -- |2= or |title_text= — optional; The text which will be shown when hovering over the cell. --]] function p.main(frame) local getArgs = require('Module:Arguments').getArgs; local args = getArgs(frame); return p._main(args) end return p
摘要:
请注意,所有对Gal中文百科的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Gal中文百科:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
此页面嵌入的页面:
Module:Table empty cell/doc
(
编辑
)
编辑“︁
Module
:
Table empty cell
”︁
来自Gal中文百科