Sha256: 602a0faa6f9e42cc25be048b029cb8bd1eab30e798bac18931dcec1497ec9930
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
# -*- encoding : utf-8 -*- class Card; module Set; class Abstract # Set: Abstract (AccountDropdown) # module AccountDropdown; extend Card::Set def self.source_location; "/Users/ethan/dev/decko/gem/card-mod-layout/set/abstract/account_dropdown.rb"; end module HtmlFormat; module_parent.send :register_set_format, Card::Format::HtmlFormat, self; extend Card::Set::AbstractFormat def link_to_mycard link_to_card Auth.current.name, nil, id: "my-card-link", class: "nav-link #{classy('my-card')}" end def account_dropdown &render_role_item split_button link_to_mycard, nil do [ link_to_card([Auth.current, :account_settings], "Account"), (["Roles", role_items(&render_role_item)] if special_roles?) ] end end def special_roles? Auth.current_roles.size > 1 end def role_items Auth.current_roles.map do |role_name| yield role_name end end end end;end;end;end; # ~~ generated from /Users/ethan/dev/decko/gem/card-mod-layout/set/abstract/account_dropdown.rb ~~
Version data entries
6 entries across 6 versions & 1 rubygems