aboutsummaryrefslogtreecommitdiff
path: root/src/guff/models/tab.cr
blob: 8d6428b4102ca6689011f068bf600ca71f40e644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
class Guff::TabModel < Guff::Model
  SQL = TemplateCache.new({
  } of Symbol => String)

  OLD_TABS = [{
    "id":   "home",
    "css":  "active",
    "icon": "fa-home",
    "name": "Home",
    "text": "View home tab.",
  }, {
    "id":   "blog",
    "icon": "fa-bullhorn",
    "name": "Blog",
    "text": "Add, view, and edit blog posts.",
  }, {
    "id":   "files",
    "icon": "fa-files-o",
    "name": "Files",
    "text": "Add, view, and edit files.",
  }, {
    "id":   "pages",
    "icon": "fa-bookmark-o",
    "name": "Pages",
    "text": "Add, view, and edit pages.",
  }, {
    "id":   "projects",
    "icon": "fa-cubes",
    "name": "Projects",
    "text": "Add, view, and edit projects.",
  }, {
    "id":   "users",
    "icon": "fa-users",
    "name": "Users",
    "text": "Add, view, and edit users and permissions.",
  }, {
    "id":   "settings",
    "icon": "fa-cog",
    "name": "Settings",
    "text": "Configure site settings.",
  }]

  TABS = [{
    "id":   "home",
    "css":  "active",
    "icon": "fa-home",
    "name": "Home",
    "text": "View home tab.",
  }, {
    "id":   "posts",
    "icon": "fa-cubes",
    "name": "Posts",
    "text": "Manage blog, pages, and projects.",
  }, {
    "id":   "files",
    "icon": "fa-files-o",
    "name": "Files",
    "text": "Manage files.",
  }, {
    "id":   "users",
    "icon": "fa-users",
    "name": "Users",
    "text": "Manage users and permissions.",
  }, {
    "id":   "settings",
    "icon": "fa-cog",
    "name": "Settings",
    "text": "Configure site settings.",
  }]

  def initialize(models : Models)
    super(models, SQL)
  end

  def get_tabs
    TABS
  end
end