Created
February 18, 2022 07:38
-
-
Save tohagan/d4261c883b9523ba240315adc7bfef20 to your computer and use it in GitHub Desktop.
Rails Tabs example
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
<%= render partial: 'shared/nav_tabs', locals: { | |
level: 2, | |
active: active, | |
title: title, | |
tabs: [ | |
{ :key => 'list', :label => 'List', :path => { action: 'index' } }, | |
{ :key => 'add', :label => 'Add', :path => { action: 'new' } }, | |
{ :key => 'import', :label => 'Import', :path => { action: 'import_new' } }, | |
] | |
} %> |
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
<%= render partial: 'shared/nav_tabs', locals: { | |
level: 1, | |
active: active, | |
title: "Manage Users", | |
tabs: [ | |
{ :key => 'members', :label => 'Members', :path => { controller: 'sites/organizations/members', action: 'index' } }, | |
{ :key => 'workers', :label => 'Workers', :path => { controller: 'sites/organizations/workers', action: 'index' } }, | |
{ :key => 'finance-managers', :label => 'Finance Managers', :path => { controller: 'sites/organizations/finance_managers', action: 'index' } }, | |
{ :key => 'administrators', :label => 'Administrators', :path => { controller: 'sites/organizations/admins', action: 'index' } }, | |
] | |
} %> |
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
<% title 'Import Members' %> | |
<%= render partial: 'shared/role_tabs', locals: { active: 'members' } %> | |
<%= render partial: 'shared/role_list_tabs', locals: { title: "Members", active: 'import' } %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment