Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,641
edits
m (Also attempt to prefix with section (hey look, an actual use for this)) |
m (ISTHISIT) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 310: | Line 310: | ||
if self.__settings.link then | if self.__settings.link then | ||
sprite = html:tag("span") | |||
local parentDiv = mw.html.create("span"):css("position","relative") | local parentDiv = mw.html.create("span"):css("position","relative") | ||
local link = self.__settings.link | local link = self.__settings.link | ||
Line 315: | Line 316: | ||
parentDiv:wikitext(link:sub( 1,#link-1 ) .. '|') | parentDiv:wikitext(link:sub( 1,#link-1 ) .. '|') | ||
else | else | ||
if | if link:sub ( 1,1 ) == '#' then | ||
parentDiv:wikitext('[[' | |||
parentDiv:wikitext('[[') | |||
local section_id = self.__source.ids[itemName].section | |||
for index, tab in pairs(self.__source.sections) do | |||
if tab.id == section_id then | |||
local section_name = tab.name | |||
parentDiv:wikitext(tab.name) | |||
break | |||
end | |||
end | |||
end | end | ||
parentDiv:wikitext('#' .. link .. '|') | |||
end | end | ||
parentDiv:node( | parentDiv:node(sprite) | ||
if link:sub( 1,1 ) == '[' then | if link:sub( 1,1 ) == '[' then |
edits