Module: Lesli::NavigationHelper

Defined in:
app/helpers/lesli/navigation_helper.rb

Instance Method Summary collapse

Instance Method Details

01.01 Admin engine



76
77
78
79
# File 'app/helpers/lesli/navigation_helper.rb', line 76

def navigation_engine_admin(title: "Administration", subtitle: "Administration area.")
    return unless defined? LesliAdmin
    navigation_engine_item(title,subtitle,"admin",lesli_admin.root_path,controller_path.include?("lesli_admin"))
end

05.02 Audit engine



192
193
194
195
# File 'app/helpers/lesli/navigation_helper.rb', line 192

def navigation_engine_audit(title: "Audit", subtitle: "Activity, logs, security and more")
    return unless defined? LesliAudit
    navigation_engine_item(title, subtitle, "audit", lesli_audit.root_path, controller_path.include?("lesli_audit"))
end

09.01 Babel engine



259
260
261
262
263
264
# File 'app/helpers/lesli/navigation_helper.rb', line 259

def navigation_engine_babel(title: "Babel", subtitle: "Translations")
    return unless defined? LesliBabel

    navigation_engine_item(title, subtitle, "babel", lesli_babel.root_path,
                           controller_path.include?("lesli_babel"))
end

03.08 Bell engine



140
141
142
143
# File 'app/helpers/lesli/navigation_helper.rb', line 140

def navigation_engine_bell(title: "Notifications", subtitle: "Notifications & Announcements")
    return unless defined? LesliBell
    navigation_engine_item(title, subtitle, "bell", lesli_bell.root_path, controller_path.include?("lesli_bell"))
end

04.01 Books engine



166
167
168
169
170
171
# File 'app/helpers/lesli/navigation_helper.rb', line 166

def navigation_engine_books(title: "Books", subtitle: "cloud_books/books-logo.svg")
    return unless defined? CloudBooks

    navigation_engine_item(title, subtitle, "books", cloud_books.root_path,
                           controller_path.include?("cloud_books"))
end

03.01 Calendar engine



110
111
112
113
# File 'app/helpers/lesli/navigation_helper.rb', line 110

def navigation_engine_calendar(title: "Calendar", subtitle: "Unified calendar app")
    return unless defined? LesliCalendar
    navigation_engine_item(title, subtitle, "calendar", lesli_calendar.root_path, controller_path.include?("lesli_calendar"))
end

03.06 Dashboard engine



128
129
130
131
# File 'app/helpers/lesli/navigation_helper.rb', line 128

def navigation_engine_dashboard(title: "Dashboard", subtitle: "Smart business assistant")
    return unless defined? LesliDashboard
    navigation_engine_item(title,subtitle,"dashboard",lesli_dashboard.root_path,controller_path.include?("lesli_dashboard"))
end

09.06 Development engine



291
292
293
294
295
296
# File 'app/helpers/lesli/navigation_helper.rb', line 291

def navigation_engine_development(title: "Dev", subtitle: "Development notes")
    return unless defined? CloudDevelopment

    navigation_engine_item(title, subtitle, "development", cloud_development.root_path,
                           controller_path.include?("cloud_development"))
end

09.02 Dispatcher engine



267
268
269
270
271
272
# File 'app/helpers/lesli/navigation_helper.rb', line 267

def navigation_engine_dispatcher(title: "Dispatcher", subtitle: "cloud_dispatcher/dispatcher-logo.svg")
    return unless defined? CloudDispatcher

    navigation_engine_item(title, subtitle, "api", cloud_dispatcher.root_path,
                           controller_path.include?("cloud_dispatcher"))
end

09.03 Federation engine



275
276
277
278
279
280
# File 'app/helpers/lesli/navigation_helper.rb', line 275

def navigation_engine_federation(title: "Federation", subtitle: "cloud_federation/federation-logo.svg")
    return unless defined? CloudFederation

    navigation_engine_item(title, subtitle, "federation", cloud_federation.root_path,
                           controller_path.include?("cloud_federation"))
end

03.03 Focus engine



116
117
118
119
# File 'app/helpers/lesli/navigation_helper.rb', line 116

def navigation_engine_focus(title: "Tasks", subtitle: "Task Management")
    return unless defined? CloudFocus
    navigation_engine_item(title,subtitle,"focus",cloud_focus.root_path,controller_path.include?("cloud_focus"))
end

02.04 House engine



90
91
92
93
# File 'app/helpers/lesli/navigation_helper.rb', line 90

def navigation_engine_house(title: "House", subtitle: "cloud_house/house-logo.svg")
    return unless defined? CloudHouse
    navigation_engine_item(title,subtitle,"house",cloud_house.root_path,controller_path.include?("cloud_house"))
end

07.01 Kb engine



211
212
213
214
215
# File 'app/helpers/lesli/navigation_helper.rb', line 211

def navigation_engine_kb(title: "Kb", subtitle: "cloud_kb/kb-logo.svg")
    return unless defined? CloudKb

    navigation_engine_item(title, subtitle, "kb", cloud_kb.root_path, controller_path.include?("cloud_kb"))
end

03.05 Letter engine



122
123
124
125
# File 'app/helpers/lesli/navigation_helper.rb', line 122

def navigation_engine_letter(title: "Letter", subtitle: "Notes & Notebooks")
    return unless defined? LesliLetter
    navigation_engine_item(title,subtitle,"letter",lesli_letter.root_path,controller_path.include?("lesli_letter"))
end

02.05 Mailer engine



96
97
98
99
# File 'app/helpers/lesli/navigation_helper.rb', line 96

def navigation_engine_mailer(title: "Mailer", subtitle: "Email automation system")
    return unless defined? CloudMailer
    navigation_engine_item(title,subtitle,"mailer",cloud_mailer.root_path,controller_path.include?("cloud_mailer"))
end

09.04 One engine



283
284
285
286
287
288
# File 'app/helpers/lesli/navigation_helper.rb', line 283

def navigation_engine_one(title: "One", subtitle: "Cloud Enterprise Resource Management")
    return unless defined? CloudOne

    navigation_engine_item(title, subtitle, "one", cloud_one.root_path,
                           controller_path.include?("cloud_one"))
end

07.03 Portal engine



226
227
228
229
230
231
# File 'app/helpers/lesli/navigation_helper.rb', line 226

def navigation_engine_portal(title: "Portal", subtitle: "cloud_portal/portal-logo.svg")
    return unless defined? CloudPortal

    navigation_engine_item(title, subtitle, "portal", cloud_portal.root_path,
                           controller_path.include?("cloud_portal"))
end

02.08 Proposal engine



102
103
104
105
# File 'app/helpers/lesli/navigation_helper.rb', line 102

def navigation_engine_proposal(title: "Proposal", subtitle: "cloud_proposal/proposal-logo.svg")
    return unless defined? CloudProposal
    navigation_engine_item(title,subtitle,"proposal",cloud_proposal.root_path,controller_path.include?("cloud_proposal"))
end

04.05 Realty engine



182
183
184
185
186
187
# File 'app/helpers/lesli/navigation_helper.rb', line 182

def navigation_engine_realty(title: "Realty", subtitle: "cloud_realty/realty-logo.svg")
    return unless defined? CloudRealty

    navigation_engine_item(title, subtitle, "realty", cloud_realty.root_path,
                           controller_path.include?("cloud_realty"))
end

06.06 Scraper engine



201
202
203
204
205
206
# File 'app/helpers/lesli/navigation_helper.rb', line 201

def navigation_engine_scraper(title: "Scraper", subtitle: "Scraper")
    return unless defined? CloudScraper

    navigation_engine_item(title, subtitle, "scraper", cloud_scraper.root_path,
                           controller_path.include?("cloud_scraper"))
end

08.02 Security engine



250
251
252
253
# File 'app/helpers/lesli/navigation_helper.rb', line 250

def navigation_engine_security(title: "Security", subtitle: "Users, Privileges & Access Management.")
    return unless defined? LesliSecurity
    navigation_engine_item(title, subtitle, "security", lesli_security.root_path, controller_path.include?("lesli_security"))
end

07.05 Shared engine



234
235
236
237
238
239
# File 'app/helpers/lesli/navigation_helper.rb', line 234

def navigation_engine_shared(title: "Shared", subtitle: "Shared & Open resources")
    return unless defined? CloudShared

    navigation_engine_item(title, subtitle, "shared", cloud_shared.root_path,
                           controller_path.include?("cloud_shared"))
end

08.01 Shield engine



244
245
246
247
# File 'app/helpers/lesli/navigation_helper.rb', line 244

def navigation_engine_shield(title: "Shield", subtitle: "Authentication & Authorization.")
    return unless defined? LesliShield
    navigation_engine_item(title, subtitle, "shield", lesli_shield.root_path, controller_path.include?("lesli_shield"))
end

03.07 Social engine



134
135
136
137
# File 'app/helpers/lesli/navigation_helper.rb', line 134

def navigation_engine_social(title: "Social", subtitle: "Team social network")
    return unless defined? CloudSocial
    navigation_engine_item(title,subtitle,"social",cloud_social.root_path,controller_path.include?("cloud_social"))
end

03.11 Storage engine



158
159
160
161
# File 'app/helpers/lesli/navigation_helper.rb', line 158

def navigation_engine_storage(title: "Storage", subtitle: "Cloud files management")
    return unless defined? CloudStorage
    navigation_engine_item(title,subtitle,"storage",cloud_storage.root_path,controller_path.include?("cloud_storage"))
end

07.02 Help engine



218
219
220
221
222
223
# File 'app/helpers/lesli/navigation_helper.rb', line 218

def navigation_engine_support(title: "Support", subtitle: "Support Ticket System")
    return unless defined? LesliSupport

    navigation_engine_item(title, subtitle, "support", lesli_support.root_path,
                           controller_path.include?("lesli_support"))
end

03.10 Talk engine



152
153
154
155
# File 'app/helpers/lesli/navigation_helper.rb', line 152

def navigation_engine_talk(title: "Talk", subtitle: "Real-time communication")
    return unless defined? CloudTalk
    navigation_engine_item(title,subtitle,"talk",cloud_talk.root_path,controller_path.include?("cloud_talk"))
end

01.02 Team engine



82
83
84
85
# File 'app/helpers/lesli/navigation_helper.rb', line 82

def navigation_engine_team(title: "Team", subtitle: "Human Resources Management")
    return unless defined? CloudTeam
    navigation_engine_item(title,subtitle,"team",cloud_team.root_path,controller_path.include?("cloud_team"))
end

04.03 Things engine



174
175
176
177
178
179
# File 'app/helpers/lesli/navigation_helper.rb', line 174

def navigation_engine_things(title: "Things", subtitle: "cloud_things/things-logo.svg")
    return unless defined? CloudThings

    navigation_engine_item(title, subtitle, "things", cloud_things.root_path,
                           controller_path.include?("cloud_things"))
end

03.09 Time engine



146
147
148
149
# File 'app/helpers/lesli/navigation_helper.rb', line 146

def navigation_engine_time(title: "Time managment", subtitle: "Track your time")
    return unless defined? CloudTime
    navigation_engine_item(title,subtitle,"time",cloud_time.root_path,controller_path.include?("cloud_time"))
end

Prints a html link inside a list item



44
45
46
47
48
# File 'app/helpers/lesli/navigation_helper.rb', line 44

def navigation_item(path, label, icon = nil, reload: false)
    (:li) do
        navigation_link(path, label, icon, reload:reload)
    end
end


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'app/helpers/lesli/navigation_helper.rb', line 50

def navigation_link(path, label, icon = nil, reload: false)
    # default vue router links for single page applications
    html_element = "router-link"
    html_options = { to: path, class: "navbar-item", 'active-class': "navigation-link-active" }

    # if reload is nedeed, we use a standard "a" tag
    if reload
        html_element = "a"
        html_options = { href: path }
    end

    (html_element, html_options) do
        # print a simple menu item (without icon)
        concat (:span, label, class: "text iconless") unless icon

        # print a full menu item if icon was requested
        if icon
            concat (:span, nil, class: icon)
            concat (:span, label, class: "text")
        end
    end
end

Prints a separator line



37
38
39
40
41
# File 'app/helpers/lesli/navigation_helper.rb', line 37

def navigation_separator
    (:li) do
        (:hr)
    end
end