@@ -1,7 +1,17 @@ | |||||
module ApplicationHelper | module ApplicationHelper | ||||
def get_title(title = '') | def get_title(title = '') | ||||
base = 'Calefaction' # TODO: replace with settings name thing | |||||
base = '[Site Name]' | |||||
title.empty? ? base : "#{title} : #{base}" | title.empty? ? base : "#{title} : #{base}" | ||||
end | end | ||||
def get_copyright_year | |||||
start = 2015 | |||||
year = Time.now.year | |||||
year > start ? "#{start}–#{year}" : start | |||||
end | |||||
def get_project_version | |||||
'0.1' # todo | |||||
end | |||||
end | end |
@@ -7,8 +7,14 @@ | |||||
<%= csrf_meta_tags %> | <%= csrf_meta_tags %> | ||||
</head> | </head> | ||||
<body> | <body> | ||||
<%= yield %> | |||||
<div id="header"> | |||||
<%= render "shared/header" %> | |||||
</div> | |||||
<div id="content"> | |||||
<%= yield %> | |||||
</div> | |||||
<div id="footer"> | |||||
<%= render "shared/footer" %> | |||||
</div> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -0,0 +1 @@ | |||||
<p>Copyright © <%= get_copyright_year %> [copyright holders] • Running Calefaction <%= get_project_version %> • [CCP Copyright Info]</p> |
@@ -0,0 +1 @@ | |||||
<!-- --> |
@@ -1,7 +1,15 @@ | |||||
<h1>Tools#index</h1> | <h1>Tools#index</h1> | ||||
<p>Users: <a href="/signup">Signup</a> • <a href="/login">Login</a></p> | |||||
<p>Admin: <a href="/admin">Admin</a></p> | |||||
<p> | |||||
Users: | |||||
<%= link_to "Signup", controller: "users", action: "create" %> | |||||
• | |||||
<%= link_to "Login", controller: "users", action: "login" %> | |||||
</p> | |||||
<p> | |||||
Admin: | |||||
<%= link_to "Admin", controller: "admin", action: "index" %> | |||||
</p> | |||||
<p>Tools: ...</p> | <p>Tools: ...</p> | ||||
<p>[Site description]</p> | <p>[Site description]</p> |