Module: Lesli::NavigationHelper
- Defined in:
- app/helpers/lesli/navigation_helper.rb
Instance Method Summary collapse
-
#navigation_engine_admin(title: "Administration", subtitle: "Administration area.") ⇒ Object
01.01 Admin engine.
-
#navigation_engine_audit(title: "Audit", subtitle: "Activity, logs, security and more") ⇒ Object
05.02 Audit engine.
-
#navigation_engine_babel(title: "Babel", subtitle: "Translation Management System") ⇒ Object
09.01 Babel engine.
-
#navigation_engine_bell(title: "Notifications", subtitle: "Notifications & Announcements") ⇒ Object
03.08 Bell engine.
-
#navigation_engine_books(title: "Books", subtitle: "cloud_books/books-logo.svg") ⇒ Object
04.01 Books engine.
-
#navigation_engine_calendar(title: "Calendar", subtitle: "Unified calendar app") ⇒ Object
03.01 Calendar engine.
-
#navigation_engine_dashboard(title: "Dashboard", subtitle: "Dashboard Manager") ⇒ Object
03.06 Dashboard engine.
-
#navigation_engine_development(title: "Dev", subtitle: "Development notes") ⇒ Object
09.06 Development engine.
-
#navigation_engine_dispatcher(title: "Dispatcher", subtitle: "cloud_dispatcher/dispatcher-logo.svg") ⇒ Object
09.02 Dispatcher engine.
-
#navigation_engine_federation(title: "Federation", subtitle: "cloud_federation/federation-logo.svg") ⇒ Object
09.03 Federation engine.
-
#navigation_engine_focus(title: "Tasks", subtitle: "Task Management") ⇒ Object
03.03 Focus engine.
-
#navigation_engine_house(title: "House", subtitle: "cloud_house/house-logo.svg") ⇒ Object
02.04 House engine.
-
#navigation_engine_kb(title: "Kb", subtitle: "cloud_kb/kb-logo.svg") ⇒ Object
07.01 Kb engine.
-
#navigation_engine_letter(title: "Letter", subtitle: "Notes & Notebooks") ⇒ Object
03.05 Letter engine.
-
#navigation_engine_mailer(title: "Mailer", subtitle: "Email automation system") ⇒ Object
02.05 Mailer engine.
-
#navigation_engine_one(title: "One", subtitle: "Cloud Enterprise Resource Management") ⇒ Object
09.04 One engine.
-
#navigation_engine_papers(title: "Papers", subtitle: "Smart Document Management") ⇒ Object
03.12 Papers engine.
-
#navigation_engine_portal(title: "Portal", subtitle: "cloud_portal/portal-logo.svg") ⇒ Object
07.03 Portal engine.
-
#navigation_engine_proposal(title: "Proposal", subtitle: "cloud_proposal/proposal-logo.svg") ⇒ Object
02.08 Proposal engine.
-
#navigation_engine_realty(title: "Realty", subtitle: "cloud_realty/realty-logo.svg") ⇒ Object
04.05 Realty engine.
-
#navigation_engine_scraper(title: "Scraper", subtitle: "Scraper") ⇒ Object
06.06 Scraper engine.
-
#navigation_engine_security(title: "Security", subtitle: "Users Authorization Management.") ⇒ Object
08.02 Security engine.
-
#navigation_engine_shared(title: "Shared", subtitle: "Shared & Open resources") ⇒ Object
07.05 Shared engine.
-
#navigation_engine_shield(title: "Shield", subtitle: "Authentication & Authorization") ⇒ Object
08.01 Shield engine.
-
#navigation_engine_social(title: "Social", subtitle: "Team social network") ⇒ Object
03.07 Social engine.
-
#navigation_engine_storage(title: "Storage", subtitle: "Cloud files management") ⇒ Object
03.11 Storage engine.
-
#navigation_engine_support(title: "Support", subtitle: "Support Ticket System") ⇒ Object
07.02 Help engine.
-
#navigation_engine_talk(title: "Talk", subtitle: "Real-time communication") ⇒ Object
03.10 Talk engine.
-
#navigation_engine_team(title: "Team", subtitle: "Human Resources Management") ⇒ Object
01.02 Team engine.
-
#navigation_engine_things(title: "Things", subtitle: "cloud_things/things-logo.svg") ⇒ Object
04.03 Things engine.
-
#navigation_engine_time(title: "Time managment", subtitle: "Track your time") ⇒ Object
03.09 Time engine.
-
#navigation_item(path, label, icon = nil, reload: false) ⇒ Object
Prints a html link inside a list item.
- #navigation_link(path, label, icon = nil, reload: false) ⇒ Object
- #navigation_link_vue(path, label, icon = nil, reload: false) ⇒ Object
- #navigation_partial ⇒ Object
-
#navigation_separator ⇒ Object
Prints a separator line.
Instance Method Details
#navigation_engine_admin(title: "Administration", subtitle: "Administration area.") ⇒ Object
01.01 Admin engine
97 98 99 100 |
# File 'app/helpers/lesli/navigation_helper.rb', line 97 def (title: "Administration", subtitle: "Administration area.") return unless defined? LesliAdmin (title,subtitle,"admin",lesli_admin.root_path,controller_path.include?("lesli_admin")) end |
#navigation_engine_audit(title: "Audit", subtitle: "Activity, logs, security and more") ⇒ Object
05.02 Audit engine
219 220 221 222 |
# File 'app/helpers/lesli/navigation_helper.rb', line 219 def (title: "Audit", subtitle: "Activity, logs, security and more") return unless defined? LesliAudit (title, subtitle, "audit", lesli_audit.root_path, controller_path.include?("lesli_audit")) end |
#navigation_engine_babel(title: "Babel", subtitle: "Translation Management System") ⇒ Object
09.01 Babel engine
284 285 286 287 288 289 |
# File 'app/helpers/lesli/navigation_helper.rb', line 284 def (title: "Babel", subtitle: "Translation Management System") return unless defined? LesliBabel (title, subtitle, "babel", lesli_babel.root_path, controller_path.include?("lesli_babel")) end |
#navigation_engine_bell(title: "Notifications", subtitle: "Notifications & Announcements") ⇒ Object
03.08 Bell engine
161 162 163 164 |
# File 'app/helpers/lesli/navigation_helper.rb', line 161 def (title: "Notifications", subtitle: "Notifications & Announcements") return unless defined? LesliBell (title, subtitle, "bell", lesli_bell.root_path, controller_path.include?("lesli_bell")) end |
#navigation_engine_books(title: "Books", subtitle: "cloud_books/books-logo.svg") ⇒ Object
04.01 Books engine
193 194 195 196 197 198 |
# File 'app/helpers/lesli/navigation_helper.rb', line 193 def (title: "Books", subtitle: "cloud_books/books-logo.svg") return unless defined? CloudBooks (title, subtitle, "books", cloud_books.root_path, controller_path.include?("cloud_books")) end |
#navigation_engine_calendar(title: "Calendar", subtitle: "Unified calendar app") ⇒ Object
03.01 Calendar engine
131 132 133 134 |
# File 'app/helpers/lesli/navigation_helper.rb', line 131 def (title: "Calendar", subtitle: "Unified calendar app") return unless defined? LesliCalendar (title, subtitle, "calendar", lesli_calendar.root_path, controller_path.include?("lesli_calendar")) end |
#navigation_engine_dashboard(title: "Dashboard", subtitle: "Dashboard Manager") ⇒ Object
03.06 Dashboard engine
149 150 151 152 |
# File 'app/helpers/lesli/navigation_helper.rb', line 149 def (title: "Dashboard", subtitle: "Dashboard Manager") return unless defined? LesliDashboard (title,subtitle,"dashboard",lesli_dashboard.root_path,controller_path.include?("lesli_dashboard")) end |
#navigation_engine_development(title: "Dev", subtitle: "Development notes") ⇒ Object
09.06 Development engine
316 317 318 319 320 321 |
# File 'app/helpers/lesli/navigation_helper.rb', line 316 def (title: "Dev", subtitle: "Development notes") return unless defined? CloudDevelopment (title, subtitle, "development", cloud_development.root_path, controller_path.include?("cloud_development")) end |
#navigation_engine_dispatcher(title: "Dispatcher", subtitle: "cloud_dispatcher/dispatcher-logo.svg") ⇒ Object
09.02 Dispatcher engine
292 293 294 295 296 297 |
# File 'app/helpers/lesli/navigation_helper.rb', line 292 def (title: "Dispatcher", subtitle: "cloud_dispatcher/dispatcher-logo.svg") return unless defined? CloudDispatcher (title, subtitle, "api", cloud_dispatcher.root_path, controller_path.include?("cloud_dispatcher")) end |
#navigation_engine_federation(title: "Federation", subtitle: "cloud_federation/federation-logo.svg") ⇒ Object
09.03 Federation engine
300 301 302 303 304 305 |
# File 'app/helpers/lesli/navigation_helper.rb', line 300 def (title: "Federation", subtitle: "cloud_federation/federation-logo.svg") return unless defined? CloudFederation (title, subtitle, "federation", cloud_federation.root_path, controller_path.include?("cloud_federation")) end |
#navigation_engine_focus(title: "Tasks", subtitle: "Task Management") ⇒ Object
03.03 Focus engine
137 138 139 140 |
# File 'app/helpers/lesli/navigation_helper.rb', line 137 def (title: "Tasks", subtitle: "Task Management") return unless defined? CloudFocus (title,subtitle,"focus",cloud_focus.root_path,controller_path.include?("cloud_focus")) end |
#navigation_engine_house(title: "House", subtitle: "cloud_house/house-logo.svg") ⇒ Object
02.04 House engine
111 112 113 114 |
# File 'app/helpers/lesli/navigation_helper.rb', line 111 def (title: "House", subtitle: "cloud_house/house-logo.svg") return unless defined? CloudHouse (title,subtitle,"house",cloud_house.root_path,controller_path.include?("cloud_house")) end |
#navigation_engine_kb(title: "Kb", subtitle: "cloud_kb/kb-logo.svg") ⇒ Object
07.01 Kb engine
238 239 240 241 242 |
# File 'app/helpers/lesli/navigation_helper.rb', line 238 def (title: "Kb", subtitle: "cloud_kb/kb-logo.svg") return unless defined? CloudKb (title, subtitle, "kb", cloud_kb.root_path, controller_path.include?("cloud_kb")) end |
#navigation_engine_letter(title: "Letter", subtitle: "Notes & Notebooks") ⇒ Object
03.05 Letter engine
143 144 145 146 |
# File 'app/helpers/lesli/navigation_helper.rb', line 143 def (title: "Letter", subtitle: "Notes & Notebooks") return unless defined? LesliLetter (title,subtitle,"letter",lesli_letter.root_path,controller_path.include?("lesli_letter")) end |
#navigation_engine_mailer(title: "Mailer", subtitle: "Email automation system") ⇒ Object
02.05 Mailer engine
117 118 119 120 |
# File 'app/helpers/lesli/navigation_helper.rb', line 117 def (title: "Mailer", subtitle: "Email automation system") return unless defined? LesliMailer (title,subtitle,"mailer", lesli_mailer.root_path,controller_path.include?("lesli_mailer")) end |
#navigation_engine_one(title: "One", subtitle: "Cloud Enterprise Resource Management") ⇒ Object
09.04 One engine
308 309 310 311 312 313 |
# File 'app/helpers/lesli/navigation_helper.rb', line 308 def (title: "One", subtitle: "Cloud Enterprise Resource Management") return unless defined? CloudOne (title, subtitle, "one", cloud_one.root_path, controller_path.include?("cloud_one")) end |
#navigation_engine_papers(title: "Papers", subtitle: "Smart Document Management") ⇒ Object
03.12 Papers engine
185 186 187 188 |
# File 'app/helpers/lesli/navigation_helper.rb', line 185 def (title: "Papers", subtitle: "Smart Document Management") return unless defined? LesliPapers (title,subtitle,"papers",lesli_papers.root_path,controller_path.include?("lesli_papers")) end |
#navigation_engine_portal(title: "Portal", subtitle: "cloud_portal/portal-logo.svg") ⇒ Object
07.03 Portal engine
251 252 253 254 255 256 |
# File 'app/helpers/lesli/navigation_helper.rb', line 251 def (title: "Portal", subtitle: "cloud_portal/portal-logo.svg") return unless defined? CloudPortal (title, subtitle, "portal", cloud_portal.root_path, controller_path.include?("cloud_portal")) end |
#navigation_engine_proposal(title: "Proposal", subtitle: "cloud_proposal/proposal-logo.svg") ⇒ Object
02.08 Proposal engine
123 124 125 126 |
# File 'app/helpers/lesli/navigation_helper.rb', line 123 def (title: "Proposal", subtitle: "cloud_proposal/proposal-logo.svg") return unless defined? CloudProposal (title,subtitle,"proposal",cloud_proposal.root_path,controller_path.include?("cloud_proposal")) end |
#navigation_engine_realty(title: "Realty", subtitle: "cloud_realty/realty-logo.svg") ⇒ Object
04.05 Realty engine
209 210 211 212 213 214 |
# File 'app/helpers/lesli/navigation_helper.rb', line 209 def (title: "Realty", subtitle: "cloud_realty/realty-logo.svg") return unless defined? CloudRealty (title, subtitle, "realty", cloud_realty.root_path, controller_path.include?("cloud_realty")) end |
#navigation_engine_scraper(title: "Scraper", subtitle: "Scraper") ⇒ Object
06.06 Scraper engine
228 229 230 231 232 233 |
# File 'app/helpers/lesli/navigation_helper.rb', line 228 def (title: "Scraper", subtitle: "Scraper") return unless defined? CloudScraper (title, subtitle, "scraper", cloud_scraper.root_path, controller_path.include?("cloud_scraper")) end |
#navigation_engine_security(title: "Security", subtitle: "Users Authorization Management.") ⇒ Object
08.02 Security engine
275 276 277 278 |
# File 'app/helpers/lesli/navigation_helper.rb', line 275 def (title: "Security", subtitle: "Users Authorization Management.") return unless defined? LesliSecurity (title, subtitle, "security", lesli_security.root_path, controller_path.include?("lesli_security")) end |
#navigation_engine_shared(title: "Shared", subtitle: "Shared & Open resources") ⇒ Object
07.05 Shared engine
259 260 261 262 263 264 |
# File 'app/helpers/lesli/navigation_helper.rb', line 259 def (title: "Shared", subtitle: "Shared & Open resources") return unless defined? CloudShared (title, subtitle, "shared", cloud_shared.root_path, controller_path.include?("cloud_shared")) end |
#navigation_engine_shield(title: "Shield", subtitle: "Authentication & Authorization") ⇒ Object
08.01 Shield engine
269 270 271 272 |
# File 'app/helpers/lesli/navigation_helper.rb', line 269 def (title: "Shield", subtitle: "Authentication & Authorization") return unless defined? LesliShield (title, subtitle, "shield", lesli_shield.root_path, controller_path.include?("lesli_shield")) end |
#navigation_engine_social(title: "Social", subtitle: "Team social network") ⇒ Object
03.07 Social engine
155 156 157 158 |
# File 'app/helpers/lesli/navigation_helper.rb', line 155 def (title: "Social", subtitle: "Team social network") return unless defined? CloudSocial (title,subtitle,"social",.root_path,controller_path.include?("cloud_social")) end |
#navigation_engine_storage(title: "Storage", subtitle: "Cloud files management") ⇒ Object
03.11 Storage engine
179 180 181 182 |
# File 'app/helpers/lesli/navigation_helper.rb', line 179 def (title: "Storage", subtitle: "Cloud files management") return unless defined? CloudStorage (title,subtitle,"storage",cloud_storage.root_path,controller_path.include?("cloud_storage")) end |
#navigation_engine_support(title: "Support", subtitle: "Support Ticket System") ⇒ Object
07.02 Help engine
245 246 247 248 |
# File 'app/helpers/lesli/navigation_helper.rb', line 245 def (title: "Support", subtitle: "Support Ticket System") return unless defined? LesliSupport (title, subtitle, "support", lesli_support.root_path, controller_path.include?("lesli_support")) end |
#navigation_engine_talk(title: "Talk", subtitle: "Real-time communication") ⇒ Object
03.10 Talk engine
173 174 175 176 |
# File 'app/helpers/lesli/navigation_helper.rb', line 173 def (title: "Talk", subtitle: "Real-time communication") return unless defined? CloudTalk (title,subtitle,"talk",cloud_talk.root_path,controller_path.include?("cloud_talk")) end |
#navigation_engine_team(title: "Team", subtitle: "Human Resources Management") ⇒ Object
01.02 Team engine
103 104 105 106 |
# File 'app/helpers/lesli/navigation_helper.rb', line 103 def (title: "Team", subtitle: "Human Resources Management") return unless defined? CloudTeam (title,subtitle,"team",cloud_team.root_path,controller_path.include?("cloud_team")) end |
#navigation_engine_things(title: "Things", subtitle: "cloud_things/things-logo.svg") ⇒ Object
04.03 Things engine
201 202 203 204 205 206 |
# File 'app/helpers/lesli/navigation_helper.rb', line 201 def (title: "Things", subtitle: "cloud_things/things-logo.svg") return unless defined? CloudThings (title, subtitle, "things", cloud_things.root_path, controller_path.include?("cloud_things")) end |
#navigation_engine_time(title: "Time managment", subtitle: "Track your time") ⇒ Object
03.09 Time engine
167 168 169 170 |
# File 'app/helpers/lesli/navigation_helper.rb', line 167 def (title: "Time managment", subtitle: "Track your time") return unless defined? CloudTime (title,subtitle,"time",cloud_time.root_path,controller_path.include?("cloud_time")) end |
#navigation_item(path, label, icon = nil, reload: false) ⇒ Object
Prints a html link inside a list item
50 51 52 53 54 |
# File 'app/helpers/lesli/navigation_helper.rb', line 50 def (path, label, icon = nil, reload: false) content_tag(:li, { class: "navbar-item"}) do (path, label, icon, reload:reload) end end |
#navigation_link(path, label, icon = nil, reload: false) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'app/helpers/lesli/navigation_helper.rb', line 56 def (path, label, icon = nil, reload: false) #content_tag(html_element, html_options) do link_to path, data: { turbo_frame: '_top' } do # print a simple menu item (without icon) concat content_tag(:span, label, class: "text iconless") unless icon # print a full menu item if icon was requested if icon concat content_tag(:span, nil, class: icon) concat content_tag(:span, label, class: "text") end end end |
#navigation_link_vue(path, label, icon = nil, reload: false) ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'app/helpers/lesli/navigation_helper.rb', line 71 def (path, label, icon = nil, reload: false) # default vue router links for single page applications html_element = "router-link" = { to: path, 'active-class': "navigation-link-active" } # if reload is nedeed, we use a standard "a" tag if reload html_element = "a" = { href: path } end content_tag(html_element, ) do # print a simple menu item (without icon) concat content_tag(:span, label, class: "text iconless") unless icon # print a full menu item if icon was requested if icon concat content_tag(:span, nil, class: icon) concat content_tag(:span, label, class: "text") end end end |
#navigation_partial ⇒ Object
36 37 38 39 40 |
# File 'app/helpers/lesli/navigation_helper.rb', line 36 def engine = lesli_engine[:code] path = engine == "root" ? "partials/navigation" : "#{engine}/partials/navigation" lookup_context.exists?(path, [], true) ? path : nil end |
#navigation_separator ⇒ Object
Prints a separator line
43 44 45 46 47 |
# File 'app/helpers/lesli/navigation_helper.rb', line 43 def content_tag(:li) do content_tag(:hr) end end |