Class: JekyllOpenSdgPlugins::SDGVariables
- Inherits:
-
Jekyll::Generator
- Object
- Jekyll::Generator
- JekyllOpenSdgPlugins::SDGVariables
- Defined in:
- lib/jekyll-open-sdg-plugins/sdg_variables.rb
Instance Method Summary collapse
-
#generate(site) ⇒ Object
This creates variables for use in Liquid templates under “page”.
-
#get_all_urls(url, language, languages, languages_public, baseurl) ⇒ Object
Get a Hash of all the URLs based on one particular one.
-
#get_goal_image(goal_image_base, language, number, extension) ⇒ Object
Compute a URL for tha goal image, given it’s number.
-
#get_goal_number(indicator_number) ⇒ Object
Get a goal number from an indicator number.
-
#get_next_indicator(list, index) ⇒ Object
Wrapper of get_next_item specifically for indicators.
-
#get_next_item(list, index) ⇒ Object
Get next item from an array, or loop to the beginning.
-
#get_previous_indicator(list, index) ⇒ Object
Wrapper of get_previous_item specifically for indicators.
-
#get_previous_item(list, index) ⇒ Object
Get previous item from an array, or loop to the end.
-
#get_sort_order(number) ⇒ Object
Make any goal/target/indicator number suitable for use in sorting.
-
#get_subpage_url(baseurl, language, number, languages, languages_public) ⇒ Object
Compute a sub-page URL for an item, given it’s number.
-
#get_target_number(indicator_number) ⇒ Object
Get a target number from an indicator number.
-
#get_url(baseurl, language, number, languages, languages_public) ⇒ Object
Compute a URL for an item, given it’s number.
-
#is_number?(string) ⇒ Boolean
Is this string numeric?.
-
#normalize_baseurl(baseurl) ⇒ Object
The Jekyll baseurl is user-configured, and can be inconsistent.
-
#set_indicator_tab_content(indicator_config, site_config) ⇒ Object
Calculate the correct content for the indicator tabs.
Instance Method Details
#generate(site) ⇒ Object
This creates variables for use in Liquid templates under “page”. We’ll create lists of goals, targets, and indicators. These will be put on the page object. Eg: page.goals. In order to generate these lists we will make use of the metadata. Each item in the list will be a hash containing these keys:
-
name (translated)
-
number (the “id” or number, eg: 1, 1.2, 1.2.1, etc.)
-
slug (version of ‘number’ but with dashes instead of dots)
-
sort (for the purposes of sorting the items, if needed)
-
global (a Hash containing any equivalent global metadata)
The goal hashes contain additional keys:
-
short (the translated short version of the name)
-
icon (path to the translated icon)
-
url (path to the goal page)
The target hashes contain additional keys:
-
goal_number (the goal number for this target)
The indicator hashes contain additional keys:
-
url (path to the indicator page)
-
goal_number (the goal number for this indicator)
-
target_number (the target number for this indicator)
- all metadata fields from the indicator
The lists are:
-
goals
-
targets
-
indicators
Additionally, on indicator pages themselves, there are variables for the current goal/target/indicator:
-
goal
-
target
-
indicator
Similarly, on goal pages themselves, there are variables for the current goal:
-
goal
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 287 def generate(site) # Some general variables needed below. translations = site.data['translations'] languages = site.config['languages'] languages_public = opensdg_languages_public(site) default_language = languages[0] baseurl = site.config['baseurl'] goal_image_base = 'https://open-sdg.org/sdg-translations/assets/img/goals' if site.config.has_key? 'goal_image_base' goal_image_base = site.config['goal_image_base'] end goal_image_extension = 'png' if site.config.has_key?('goal_image_extension') && site.config['goal_image_extension'] != '' goal_image_extension = site.config['goal_image_extension'] end # These keys are flagged as "protected" here so that we can make sure that # country-specific metadata doesn't use any of these fields. protected_keys = ['goals', 'goal', 'targets', 'target', 'indicators', 'indicator', 'language', 'name', 'number', 'sort', 'global', 'url', 'goal_number', 'target_number' ] # Figure out from our translations the global indicator numbers. global_inids = translations[default_language]['global_indicators'].keys global_inids = global_inids.select { |x| x.end_with? '-title' } global_inids = global_inids.map { |x| x.gsub('-title', '').gsub('-', '.') } # For available indicators, we simply map the "indicators" collection. available_inids = site.collections['indicators'].docs.select { |x| x.data['language'] == default_language } available_inids = available_inids.map { |x| x.data['indicator_number'] } available_indicators = {} available_targets = {} available_goals = {} # Some throwaway variables to keep track of what has been added. already_added = {} # Set up some empty hashes, per language. languages.each do |language| available_goals[language] = [] available_targets[language] = [] available_indicators[language] = [] already_added[language] = [] end # Populate the hashes. available_inids.each do |indicator_number| goal_number = get_goal_number(indicator_number) target_number = get_target_number(indicator_number) is_global_indicator = global_inids.index(indicator_number) != nil # To get the name of global stuff, we can use predicable translation # keys from the SDG Translations project. Eg: global_goals.1-title goal_translation_key = 'global_goals.' + goal_number target_translation_key = 'global_targets.' + target_number.gsub('.', '-') indicator_translation_key = 'global_indicators.' + indicator_number.gsub('.', '-') languages.each do |language| global_goal = { 'name' => opensdg_translate_key(goal_translation_key + '-title', translations, language), # TODO: More global metadata about goals? } global_target = { 'name' => opensdg_translate_key(target_translation_key + '-title', translations, language), # TODO: More global metadata about targets? } global_indicator = {} if is_global_indicator global_indicator = { 'name' => opensdg_translate_key(indicator_translation_key + '-title', translations, language), # TODO: More global metadata about indicators? } end # We have to get the metadata for the indicator/language. = {} # Currently the meta keys are dash-delimited. This is a little # arbitrary (it's because they came from filenames) and could maybe # be changed eventually to dot-delimited for consistency. = indicator_number.gsub('.', '-') = site.data[language]['meta'][] is_standalone = (.has_key?('standalone') and ['standalone']) is_placeholder = (.has_key?('placeholder') and ['placeholder'] != '') # Set the goal for this language, once only. if !is_standalone && already_added[language].index(goal_number) == nil already_added[language].push(goal_number) available_goal = { 'number' => goal_number, 'slug' => goal_number.gsub('.', '-'), 'name' => opensdg_translate_key(goal_translation_key + '-title', translations, language), 'short' => opensdg_translate_key(goal_translation_key + '-short', translations, language), 'url' => get_subpage_url(baseurl, language, goal_number, languages, languages_public), 'icon' => get_goal_image(goal_image_base, language, goal_number, goal_image_extension), 'sort' => get_sort_order(goal_number), 'global' => global_goal, } available_goals[language].push(available_goal) end # Set the target for this language, once only. if !is_standalone && already_added[language].index(target_number) == nil already_added[language].push(target_number) available_target = { 'number' => target_number, 'slug' => target_number.gsub('.', '-'), 'name' => opensdg_translate_key(target_translation_key + '-title', translations, language), 'sort' => get_sort_order(target_number), 'goal_number' => goal_number, 'global' => global_target, } available_targets[language].push(available_target) end # Set the indicator for this language. Unfortunately we are currently # using two possible fields for the indicator name: # - indicator_name # - indicator_name_national # TODO: Eventually standardize around 'indicator_name' and drop support # for 'indicator_name_national'. indicator_name = '' if .has_key? 'indicator_name_national' indicator_name = ['indicator_name_national'] else indicator_name = ['indicator_name'] end indicator_path = indicator_number if is_standalone && .has_key?('permalink') && ['permalink'] != '' indicator_path = ['permalink'] end indicator_sort = get_sort_order(indicator_number) if .has_key?('sort') && ['sort'] != '' # Allow metadata 'sort' field to override the default sort. indicator_sort = ['sort'] end if .has_key?('graph_annotations') && ['graph_annotations'].length > 0 ['graph_annotations'].each do |annotation| if annotation.has_key?('borderDash') && annotation['borderDash'].is_a?(String) annotation['borderDash'] = [2, 2] opensdg_notice('The "borderDash" property in graph annotations must be an array. Using [2, 2].') end end end available_indicator = { 'number' => indicator_number, 'slug' => indicator_number.gsub('.', '-'), 'name' => opensdg_translate_key(indicator_name, translations, language), 'url' => get_subpage_url(baseurl, language, indicator_path, languages, languages_public), 'sort' => indicator_sort, 'goal_number' => goal_number, 'target_number' => target_number, 'global' => global_indicator, } # Translate and add any metadata. .each do |key, value| if !protected_keys.include? key available_indicator[key] = opensdg_translate_key(value, translations, language) end end # Translate the ignored_disaggregations site configuration for this particular indicator. if site.config.has_key?('ignored_disaggregations') && site.config['ignored_disaggregations'].is_a?(Array) translated_ignored_disaggregations = [] site.config['ignored_disaggregations'].each do |key| translated = opensdg_translate_key(key, translations, language) if translated == key && key.is_a?(String) # If no translation happened, also try the SDMX convention of using the dimension code # for both the "translation group" and the "translation key". Eg, "OBS_STATUS.OBS_STATUS" sdmx_key = key + '.' + key sdmx_translation = opensdg_translate_key(sdmx_key, translations, language) if sdmx_translation != sdmx_key translated = sdmx_translation else # If still no translation happened, also try the "data" translation group. data_key = 'data.' + key data_translation = opensdg_translate_key(data_key, translations, language) if data_translation != data_key translated = data_translation end end end translated_ignored_disaggregations.push(translated) end available_indicator['ignored_disaggregations'] = translated_ignored_disaggregations end available_indicators[language].push(available_indicator) end end # Sort all the items. languages.each do |lang| available_goals[lang] = available_goals[lang].sort_by { |x| x['sort'] } available_targets[lang] = available_targets[lang].sort_by { |x| x['sort'] } available_indicators[lang] = available_indicators[lang].sort_by { |x| x['sort'] } end # Next set the stuff on each doc in certain collections, according # to the doc's language. We'll be putting the global stuff on every # page, goal, and indicator across the site. This may be a bit memory- # intensive during the Jekyll build, but it is nice to have it available # for consistency. site.collections.keys.each do |collection| site.collections[collection].docs.each do |doc| # Ensure it has a language. if !doc.data.has_key? 'language' doc.data['language'] = default_language end # Ensure it has a valid language. if !languages.include? doc.data['language'] = "NOTICE: The document '#{doc.basename}' has an unexpected language '#{doc.data['language']}' so we are using the default language '#{default_language}' instead." opensdg_notice() doc.data['language'] = default_language end language = doc.data['language'] # Set the language for numbers. doc.data['language_numbers'] = language if site.config.has_key?('languages_numbers') && site.config['languages_numbers'].is_a?(Array) language_for_numbers = site.config['languages_numbers'].find{ |item| item['language'] == language } unless language_for_numbers.nil? doc.data['language_numbers'] = language_for_numbers['language_numbers'] end end # Set these on the page object. doc.data['goals'] = available_goals[language] doc.data['targets'] = available_targets[language] doc.data['indicators'] = available_indicators[language] doc.data['baseurl'] = get_url(baseurl, language, '', languages, languages_public) doc.data['url_by_language'] = get_all_urls(doc.url, language, languages, languages_public, baseurl) doc.data['t'] = site.data['translations'][language] # Set the remote_data_prefix for this page. if site.config.has_key?('remote_data_prefix') && opensdg_is_path_remote(site.config['remote_data_prefix']) doc.data['remote_data_prefix'] = site.config['remote_data_prefix'] else doc.data['remote_data_prefix'] = normalize_baseurl(baseurl) end doc.data['remote_data_prefix_untranslated'] = File.join(doc.data['remote_data_prefix'], 'untranslated') doc.data['remote_data_prefix'] = File.join(doc.data['remote_data_prefix'], language) # Set the logo for this page. logo = {} match = false if site.config.has_key?('logos') && site.config['logos'].length > 0 match = site.config['logos'].find{ |item| item['language'] == language } unless match match = site.config['logos'].find{ |item| item.fetch('language', '') == '' } end end if match src = match['src'] unless src.start_with?('http') src = normalize_baseurl(baseurl) + src end logo['src'] = src logo['alt'] = opensdg_translate_key(match['alt'], translations, language) else logo['src'] = normalize_baseurl(baseurl) + 'assets/img/SDG_logo.png' alt_text = opensdg_translate_key('general.sdg', translations, language) alt_text += ' - ' alt_text += opensdg_translate_key('header.tag_line', translations, language) logo['alt'] = alt_text end doc.data['logo'] = logo if collection == 'indicators' || doc.data['layout'] == 'indicator-iframe' # For indicators we also set the current indicator/target/goal. if doc.data.has_key? 'indicator_number' indicator_number = doc.data['indicator_number'] else opensdg_error("Error: An indicator does not have 'indicator_number' property.") end # Force the indicator number to be a string. if indicator_number.is_a? Numeric indicator_number = indicator_number.to_s end goal_number = get_goal_number(indicator_number) target_number = get_target_number(indicator_number) doc.data['goal'] = available_goals[language].find {|x| x['number'] == goal_number} doc.data['target'] = available_targets[language].find {|x| x['number'] == target_number} indicator_index = available_indicators[language].find_index {|x| x['number'] == indicator_number} doc.data['indicator'] = available_indicators[language][indicator_index] doc.data['next'] = get_next_indicator(available_indicators[language], indicator_index) doc.data['previous'] = get_previous_indicator(available_indicators[language], indicator_index) # Also calculate the content for the indicator tabs. set_indicator_tab_content(doc.data['indicator'], site.config) elsif collection == 'goals' # For goals we also set the current goal. if doc.data.has_key? 'goal_number' goal_number = doc.data['goal_number'] else opensdg_error("Error: A goal does not have 'goal_number' property.") end # Force the goal number to be a string. if goal_number.is_a? Numeric goal_number = goal_number.to_s end goal_index = available_goals[language].find_index {|x| x['number'] == goal_number} doc.data['goal'] = available_goals[language][goal_index] doc.data['next'] = get_next_item(available_goals[language], goal_index) doc.data['previous'] = get_previous_item(available_goals[language], goal_index) end end end # Finally let's set all these on the site object so that they can be # easily looked up later. lookup = {} available_goals.each do |language, items| lookup[language] = {} items.each do |item| number = item['number'] lookup[language][number] = item end end available_targets.each do |language, items| items.each do |item| number = item['number'] lookup[language][number] = item end end available_indicators.each do |language, items| items.each do |item| number = item['number'] lookup[language][number] = item end end site.data['sdg_lookup'] = lookup end |
#get_all_urls(url, language, languages, languages_public, baseurl) ⇒ Object
Get a Hash of all the URLs based on one particular one.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 145 def get_all_urls(url, language, languages, languages_public, baseurl) baseurl = normalize_baseurl(baseurl) language_public = language if languages_public && languages_public[language] language_public = languages_public[language] end # First figure out the language-free URL. default_language = languages[0] if language == default_language url_without_language = url else url_without_language = url.gsub('/' + language_public + '/', '/') end urls = { language => url } if language != default_language default_language_url = baseurl + url_without_language # Fix potential double-slash. default_language_url = default_language_url.gsub('//', '/') urls[default_language] = default_language_url end languages.each do |other_language| if other_language == language next end if other_language == default_language next end other_language_public = other_language if languages_public && languages_public[other_language] other_language_public = languages_public[other_language] end urls[other_language] = baseurl + other_language_public + url_without_language end urls end |
#get_goal_image(goal_image_base, language, number, extension) ⇒ Object
Compute a URL for tha goal image, given it’s number.
188 189 190 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 188 def get_goal_image(goal_image_base, language, number, extension) goal_image_base + '/' + language + '/' + number + '.' + extension end |
#get_goal_number(indicator_number) ⇒ Object
Get a goal number from an indicator number.
10 11 12 13 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 10 def get_goal_number(indicator_number) parts = indicator_number.split('.') parts[0] end |
#get_next_indicator(list, index) ⇒ Object
Wrapper of get_next_item specifically for indicators.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 85 def get_next_indicator(list, index) indicator = get_next_item(list, index) # Skip placeholder indicators. is_placeholder = (indicator.has_key?('placeholder') and indicator['placeholder'] != '') while (is_placeholder) index += 1 if index >= list.length() index = 0 end indicator = get_next_item(list, index) is_placeholder = (indicator.has_key?('placeholder') and indicator['placeholder'] != '') end return indicator end |
#get_next_item(list, index) ⇒ Object
Get next item from an array, or loop to the beginning.
60 61 62 63 64 65 66 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 60 def get_next_item(list, index) incremented = index + 1 if incremented >= list.length() incremented = 0 end list[incremented] end |
#get_previous_indicator(list, index) ⇒ Object
Wrapper of get_previous_item specifically for indicators.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 69 def get_previous_indicator(list, index) indicator = get_previous_item(list, index) # Skip placeholder indicators. is_placeholder = (indicator.has_key?('placeholder') and indicator['placeholder'] != '') while (is_placeholder) index -= 1 if index < 0 index = list.length() - 1 end indicator = get_previous_item(list, index) is_placeholder = (indicator.has_key?('placeholder') and indicator['placeholder'] != '') end return indicator end |
#get_previous_item(list, index) ⇒ Object
Get previous item from an array, or loop to the end.
51 52 53 54 55 56 57 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 51 def get_previous_item(list, index) decremented = index - 1 if decremented < 0 decremented = list.length() - 1 end list[decremented] end |
#get_sort_order(number) ⇒ Object
Make any goal/target/indicator number suitable for use in sorting.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 31 def get_sort_order(number) if number.is_a? Numeric number = number.to_s end sort_order = '' parts = number.split('.') parts.each do |part| if part.length == 1 if is_number?(part) part = '0' + part else part = part + part end end sort_order += part end sort_order end |
#get_subpage_url(baseurl, language, number, languages, languages_public) ⇒ Object
Compute a sub-page URL for an item, given it’s number.
134 135 136 137 138 139 140 141 142 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 134 def get_subpage_url(baseurl, language, number, languages, languages_public) url = get_url(baseurl, language, number, languages, languages_public) # Becuase Open SDG is a static site, subpages should end with # a slash if they are not actual files (with file extensions). unless url.split('/').last().include?('.') url = url + '/' end url end |
#get_target_number(indicator_number) ⇒ Object
Get a target number from an indicator number.
16 17 18 19 20 21 22 23 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 16 def get_target_number(indicator_number) parts = indicator_number.split('.') if parts.length() < 2 indicator_number else parts[0] + '.' + parts[1] end end |
#get_url(baseurl, language, number, languages, languages_public) ⇒ Object
Compute a URL for an item, given it’s number.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 116 def get_url(baseurl, language, number, languages, languages_public) baseurl = normalize_baseurl(baseurl) default_language = languages[0] language_public = language if languages_public && languages_public[language] language_public = languages_public[language] end if default_language != language baseurl += language_public + '/' end number = number.gsub('.', '-') baseurl + number end |
#is_number?(string) ⇒ Boolean
Is this string numeric?
26 27 28 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 26 def is_number? string true if Float(string) rescue false end |
#normalize_baseurl(baseurl) ⇒ Object
The Jekyll baseurl is user-configured, and can be inconsistent. This ensure it is consistent in whether it starts/ends with a slash.
102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 102 def normalize_baseurl(baseurl) if baseurl == '' || baseurl.nil? baseurl = '/' end if !baseurl.start_with? '/' baseurl = '/' + baseurl end if !baseurl.end_with? '/' baseurl = baseurl + '/' end baseurl end |
#set_indicator_tab_content(indicator_config, site_config) ⇒ Object
Calculate the correct content for the indicator tabs.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/jekyll-open-sdg-plugins/sdg_variables.rb', line 193 def set_indicator_tab_content(indicator_config, site_config) defaults = { 'tab_1' => 'chart', 'tab_2' => 'table', 'tab_3' => 'map', 'tab_4' => 'embed', } # Use the site config or defaults if necessary. tabs = site_config.has_key?('indicator_tabs') ? site_config['indicator_tabs'] : defaults no_config = tabs.values.all? { |value| value == '' } if no_config tabs = defaults end # Override for this indicator if needed. if indicator_config.has_key?('indicator_tabs') if indicator_config['indicator_tabs'].has_key?('override') if indicator_config['indicator_tabs']['override'] tabs = indicator_config['indicator_tabs'] end end end = (indicator_config.has_key?('embedded_feature_tab_title') && indicator_config['embedded_feature_tab_title'] != '') = ? indicator_config['embedded_feature_tab_title'] : 'Embed' labels = { 'chart' => 'indicator.chart', 'table' => 'indicator.table', 'map' => 'indicator.map', 'embed' => , } tabs_list = [] ['tab_1', 'tab_2', 'tab_3', 'tab_4'].each do |tab_number| type = tabs[tab_number] if type == 'hide' next end if type == 'embed' = (indicator_config.has_key?('embedded_feature_url') && indicator_config['embedded_feature_url'] != '') = (indicator_config.has_key?('embedded_feature_html') && indicator_config['embedded_feature_html'] != '') unless || next end elsif type == 'map' show_map = (indicator_config.has_key?('data_show_map') && indicator_config['data_show_map']) unless show_map next end end tabs_list.push({ 'type' => type, 'label' => labels[type], }) end indicator_config['indicator_tabs_list'] = tabs_list end |