-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9317 from liu-samuel/settings-tabs-conversion
Convert application settings tabs and subtabs
- Loading branch information
Showing
16 changed files
with
193 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module SettingsTabsHelper | ||
SETTINGS_TAB_IDS = %w[ | ||
settings_details | ||
settings_cu_collection | ||
settings_tags | ||
settings_replication | ||
settings_help_menu | ||
settings_advanced | ||
] | ||
|
||
def settings_tab_configuration | ||
[:details, :cu_collection, :tags, :replication, :help_menu, :advanced] | ||
end | ||
|
||
def settings_tab_content(key_name, &block) | ||
if settings_tabs_types[key_name] | ||
tag.div(:id => "settings_#{key_name}", :class => 'tab_content', &block) | ||
end | ||
end | ||
|
||
def settings_tab_index_by_name(name) | ||
[SETTINGS_TAB_IDS.index(name) || -1, SETTINGS_TAB_IDS.length] | ||
end | ||
|
||
private | ||
|
||
def settings_tabs_types | ||
{ | ||
:details => _('Details'), | ||
:cu_collection => _('C & U Collection'), | ||
:tags => _('Tags'), | ||
:replication => _('Replication'), | ||
:help_menu => _('Help Menu'), | ||
:advanced => _('Advanced'), | ||
} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module SettingsTagsHelper | ||
|
||
SETTINGS_TAGS_TABS_IDS = %w[ | ||
settings_my_company_categories | ||
settings_my_company_tags | ||
settings_import_tags | ||
settings_import_variables | ||
settings_map_tags | ||
] | ||
|
||
def settings_tags_configuration | ||
[:my_company_categories, :my_company_tags, :import_tags, :import_variables, :map_tags] | ||
end | ||
|
||
def settings_tags_content(key_name, &block) | ||
if settings_tags_types[key_name] | ||
tag.div(:id => key_name, :class => 'tab_content', &block) | ||
end | ||
end | ||
|
||
def settings_tags_tab_index_by_name(name) | ||
SETTINGS_TAGS_TABS_IDS.index(name) || -1 | ||
end | ||
|
||
private | ||
|
||
def settings_tags_types | ||
{ | ||
:my_company_categories => _('My Company Categories'), | ||
:my_company_tags => _('My Company Tags'), | ||
:import_tags => _('Import Tags'), | ||
:import_variables => _('Import Variables'), | ||
:map_tags => _('Map Tags'), | ||
} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,9 @@ | |
margin-bottom: 0px; | ||
} | ||
} | ||
|
||
#settings-tabs-wrapper { | ||
.bx--tab-content { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- if @sb[:active_tab] == "settings_tags" && @sb[:active_subtab] == "settings_co_categories" | ||
- if @sb[:active_tab] == "settings_tags" && @sb[:active_subtab] == "settings_my_company_categories" | ||
= react('SettingsCompanyCategories', {:initialData => settings_company_categories_list(@categories)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
- if @sb[:active_tab] == "settings_tags" && @sb[:active_subtab] == "settings_co_tags" | ||
- if @sb[:active_tab] == "settings_tags" && @sb[:active_subtab] == "settings_my_company_tags" | ||
#tab_div | ||
= react('SettingsCompanyTags', {:pageTitle => "#{current_tenant.name} #{_('Tags')}", :categoryId => @cat.id}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- if @sb[:active_tab] == "settings_tags" && @sb[:active_subtab] == "settings_label_tag_mapping" | ||
- if @sb[:active_tab] == "settings_tags" && @sb[:active_subtab] == "settings_map_tags" | ||
= react('SettingsLabelTagMapping', {:initialData => settings_label_tab_mapping_list(@any_mapping_is_all_entities, @lt_mapping)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters