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 = { admin: [{ "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.", }], post_new: [{ "id": "type", "icon": "", "name": "Choose Post Type", "text": "", }, { "id": "blog", "icon": "", "name": "Create Blog Post", "text": "", }, { "id": "page", "icon": "", "name": "Create Page", "text": "", }, { "id": "project", "icon": "", "name": "Create Project", "text": "", }], } def initialize(models : Models) super(models, SQL) end def get_tabs(id : Symbol) TABS[id] end end