وحدة:بطاقة/قالب/متحف

من ويكيبيديا، الموسوعة الحرة

-- Credits:
-- Original from fr:Module:Infobox/Musée
-- forked by وهراني @arwiki (ar:وحدة:بطاقة/قالب/متحف)
-- Version: 20230705

local generic = require( 'وحدة:بطاقة/أدوات' )
local building = require( 'وحدة:بطاقة/أدوات/مبنى' )
local org = require( 'وحدة:بطاقة/أدوات/منظمة' )

local localdata = require  'وحدة:بطاقة/بيانات' 

return 
	{
	maincolor = 'C8D8FF',
    wikimod = 'Wikidata.Ca',

	parts =
    	{
			generic.title({icon='museum'}),
			{type = 'subtitle', 
		        value = function ( localdata )
                    local val = localdata['الاسم الأصلي'] or localdata['اسم اصلي'] or localdata['native_name']
                    if val and localdata['لغة_الاسم_الأصلي']  then
                        return mw.ustring.format('%s <span class="nickname" lang="%s">%s</span>'
                            , val 
                            , localdata['الاسم_باللغة_الاصلية'] or ''
                            , localdata['لغة_الاسم_الأصلي']
                        )
                    end
                    return val
                end,
		        wikidata= {property = 'P1559 OR P1476 OR P1448 OR P1705', list = 'notlang', conjunction = "<br />"
		                   ,listrank='bestrank' ,formatting = '$text {{Language icon|NoCat=y|$language}}'}
		    },
			generic.logo(),
			generic.mainimage(),
			{type = 'table', title = 'معلومات عامة', rows = {
				{
					type = "row",
					label = "نوع",
					value = {"نوع", "type"},
					wikidata = {property = "P31"},
					metadata = {
						description = "نوع المتحف",
						option = "suggested", 
						type = "string", 
					}
				},
				building.opening(),
				building.closure(),
                generic.memberof(),
				building.operator(),
				building.part_of(),

				org.key_people(),

				building.visitors(),
				building.website(),
				building.phone_number(),
				building.open_days(),
			}},
			{type = 'table', title = 'المحتويات', rows = {
	            {
	                type = "row",
	                label = "يضم",
	                value = {"يضم", "parts"},
	                wikidata = {property = "P527", conjunction = "<br />"},
	                metadata = {
						description = "",
						option = "", 
						type = "", 
	                }
	            },
				{type = 'row', label = 'المجموعات', value = 'مجموعات'}, 
				{type = 'row', label = 'الأعمال', value = 'أعمال'},
				{type = 'row', label = 'المصدر', value = 'مصدر'},
				{type = 'row', label = 'المواضيع', value = {'موضوع','subject'}, property ="P921"},
				{type = 'row', label = 'حجم المعروضات', value = {'حجم','size'}, property ="P1436"},
				{type = 'row', label = 'الفترات الزمنية', value = 'فترة'},
				generic.website({
					label = "فهرس على الويب",
					value = {"فهرس", "catalog"},
					property ="P8768"}), -- online catalog
				}
			 },			 				 
			{type = 'table', title = 'المبنى', rows = {
				building.adminlocation(),
				building.archistyle(),
				building.construction(),
				building.reconstruction(),
				building.renovation(),
				building.creator(),
				building.dimensions(),
				building.facilities(),
				--building.coordinates(),
				}
			 },
			generic.geoloc({default_zoom=12,marker='museum'}),
	}
}