mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Remove unused layout and clear up naming
* scaffold.css is only used by login -> rename to login.css * standard.html.erb is the default application layout -> rename to application.html.erb * scaffold.html.erb is unused -> deleted
This commit is contained in:
parent
4fb9939e3a
commit
27adccb6e9
9 changed files with 105 additions and 133 deletions
|
@ -12,7 +12,7 @@ class ApplicationController < ActionController::Base
|
||||||
include LoginSystem
|
include LoginSystem
|
||||||
helper_method :current_user, :prefs, :format_date, :markdown
|
helper_method :current_user, :prefs, :format_date, :markdown
|
||||||
|
|
||||||
layout proc{ |controller| controller.mobile? ? "mobile" : "standard" }
|
layout proc{ |controller| controller.mobile? ? "mobile" : "application" }
|
||||||
# exempt_from_layout /\.js\.erb$/
|
# exempt_from_layout /\.js\.erb$/
|
||||||
|
|
||||||
before_filter :check_for_deprecated_password_hash
|
before_filter :check_for_deprecated_password_hash
|
||||||
|
|
|
@ -20,7 +20,7 @@ class FeedlistController < ApplicationController
|
||||||
@hidden_contexts = current_user.contexts.hidden
|
@hidden_contexts = current_user.contexts.hidden
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => 'standard' }
|
format.html { render :layout => 'application' }
|
||||||
format.m
|
format.m
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ class StatsController < ApplicationController
|
||||||
get_stats_projects
|
get_stats_projects
|
||||||
get_stats_tags
|
get_stats_tags
|
||||||
|
|
||||||
render :layout => 'standard'
|
render :layout => 'application'
|
||||||
end
|
end
|
||||||
|
|
||||||
def actions_done_last12months_data
|
def actions_done_last12months_data
|
||||||
|
|
|
@ -1,16 +1,103 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>Tracksapp</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
<%= stylesheet_link_tag "application", :media => "all" %>
|
||||||
<%= javascript_include_tag "application" %>
|
<%= stylesheet_link_tag "print", :media => "print" %>
|
||||||
<%= csrf_meta_tags %>
|
<%= javascript_include_tag "application" %>
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
<%= csrf_meta_tag %>
|
||||||
<%= favicon_link_tag 'apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
|
<script type="text/javascript">
|
||||||
</head>
|
var SOURCE_VIEW = '<%=@source_view%>';
|
||||||
<body>
|
var AUTH_TOKEN = '<%= raw(protect_against_forgery? ? form_authenticity_token.inspect : "") %>'
|
||||||
|
var TAG_NAME = '<%= @tag_name ? @tag_name : "" %>'
|
||||||
|
var defaultContexts = <%= default_contexts_for_autocomplete.html_safe rescue '{}' %>;
|
||||||
|
var defaultTags = <%= default_tags_for_autocomplete.html_safe rescue '{}' %>;
|
||||||
|
var dateFormat = '<%= date_format_for_date_picker %>';
|
||||||
|
var weekStart = '<%= current_user.prefs.week_starts %>';
|
||||||
|
function relative_to_root(path) { return '<%= root_url %>'+path; };
|
||||||
|
<% if current_user.prefs.refresh != 0 -%>
|
||||||
|
setup_auto_refresh(<%= current_user.prefs["refresh"].to_i*60000 %>);
|
||||||
|
<% end -%>
|
||||||
|
<% unless controller.controller_name == 'feed' or session['noexpiry'] == "on" -%>
|
||||||
|
setup_periodic_check("<%=url_for(:controller => "login", :action => "check_expiry")%>", 5*60);
|
||||||
|
<% end -%>
|
||||||
|
setup_periodic_check("<%=check_deferred_todos_path(:format => 'js')%>", 10*60, 'POST');
|
||||||
|
<%= generate_i18n_strings %>
|
||||||
|
</script>
|
||||||
|
<%= favicon_link_tag 'favicon.ico' %>
|
||||||
|
<%= favicon_link_tag 'apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
|
||||||
|
<%= auto_discovery_link_tag(:rss, {:controller => "todos", :action => "index", :format => 'rss', :token => "#{current_user.token}"}, {:title => t('layouts.next_actions_rss_feed')}) %>
|
||||||
|
<link rel="search" type="application/opensearchdescription+xml" title="Tracks" href="<%= search_plugin_path(:format => :xml) %>" />
|
||||||
|
<title><%= @page_title %></title>
|
||||||
|
</head>
|
||||||
|
|
||||||
<%= yield %>
|
<body class="<%= controller.controller_name %>">
|
||||||
|
|
||||||
</body>
|
<div id="topbar">
|
||||||
|
<%= NOTIFY_BAR.html_safe %>
|
||||||
|
|
||||||
|
<div id="date">
|
||||||
|
<h1>
|
||||||
|
<% if @count -%>
|
||||||
|
<span id="badge_count" class="badge"><%= @count %></span>
|
||||||
|
<% end -%>
|
||||||
|
<%= l(Date.today, :format => current_user.prefs.title_date_format) %>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div id="minilinks">
|
||||||
|
<%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %>
|
||||||
|
|
|
||||||
|
<%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
|
||||||
|
|
|
||||||
|
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
||||||
|
</div>
|
||||||
|
<div id="navcontainer">
|
||||||
|
<ul class="sf-menu">
|
||||||
|
<li><%= navigation_link(t('layouts.navigation.home'), root_path, {:accesskey => "t", :title => t('layouts.navigation.home_title')} ) %></li>
|
||||||
|
<li><%= navigation_link(t('layouts.navigation.starred'), tag_path("starred"), :title => t('layouts.navigation.starred_title')) %></li>
|
||||||
|
<li><%= navigation_link(t('common.projects'), projects_path, {:accesskey=>"p", :title=>t('layouts.navigation.projects_title')} ) %></li>
|
||||||
|
<li><%= navigation_link(t('layouts.navigation.tickler'), tickler_path, {:accesskey =>"k", :title => t('layouts.navigation.tickler_title')} ) %></li>
|
||||||
|
<li><a href="#"><%= t('layouts.navigation.organize') %></a>
|
||||||
|
<ul>
|
||||||
|
<li><%= navigation_link( t('common.contexts'), contexts_path, {:accesskey=>"c", :title=>t('layouts.navigation.contexts_title')} ) %></li>
|
||||||
|
<li><%= navigation_link( t('common.notes'), notes_path, {:accesskey => "o", :title => t('layouts.navigation.notes_title')} ) %></li>
|
||||||
|
<li><%= navigation_link( t('common.review'), review_path, {:accesskey => "r", :title => t('layouts.navigation.review_title')} ) %></li>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#"><%= t('layouts.navigation.view') %></a>
|
||||||
|
<ul>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#"><%= t('layouts.navigation.admin') %></a>
|
||||||
|
<ul>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.preferences'), preferences_path, {:accesskey => "u", :title => t('layouts.navigation.preferences_title')} ) %></li>
|
||||||
|
<li><%= navigation_link( t('layouts.navigation.export'), data_path, {:accesskey => "i", :title => t('layouts.navigation.export_title')} ) %></li>
|
||||||
|
<% if current_user.is_admin? -%>
|
||||||
|
<li><%= navigation_link(t('layouts.navigation.manage_users'), users_path, {:accesskey => "a", :title => t('layouts.navigation.manage_users_title')} ) %></li>
|
||||||
|
<% end -%>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#"><%= t('layouts.navigation.help') %></a>
|
||||||
|
<ul>
|
||||||
|
<li><%= link_to t('layouts.navigation.integrations_'), integrations_path %></li>
|
||||||
|
<li><%= link_to t('layouts.navigation.api_docs'), rest_api_docs_path %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><%= navigation_link(image_tag("system-search.png", :size => "16X16", :border => 0), search_path, :title => t('layouts.navigation.search')) %></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<%= render_flash %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content" class="<%= controller.controller_name %>">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= render :partial => "shared/footer" %>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<%= stylesheet_link_tag "scaffold" %>
|
<%= stylesheet_link_tag "login" %>
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
<%= favicon_link_tag 'favicon.ico' %>
|
||||||
<%= favicon_link_tag 'apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
|
<%= favicon_link_tag 'apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
|
||||||
<title><%= @page_title -%></title>
|
<title><%= @page_title -%></title>
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Login</title>
|
|
||||||
<%= stylesheet_link_tag "scaffold" %>
|
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
|
||||||
<%= favicon_link_tag 'apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<%= yield %>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,103 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
||||||
<%= stylesheet_link_tag "application", :media => "all" %>
|
|
||||||
<%= stylesheet_link_tag "print", :media => "print" %>
|
|
||||||
<%= javascript_include_tag "application" %>
|
|
||||||
<%= csrf_meta_tag %>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var SOURCE_VIEW = '<%=@source_view%>';
|
|
||||||
var AUTH_TOKEN = '<%= raw(protect_against_forgery? ? form_authenticity_token.inspect : "") %>'
|
|
||||||
var TAG_NAME = '<%= @tag_name ? @tag_name : "" %>'
|
|
||||||
var defaultContexts = <%= default_contexts_for_autocomplete.html_safe rescue '{}' %>;
|
|
||||||
var defaultTags = <%= default_tags_for_autocomplete.html_safe rescue '{}' %>;
|
|
||||||
var dateFormat = '<%= date_format_for_date_picker %>';
|
|
||||||
var weekStart = '<%= current_user.prefs.week_starts %>';
|
|
||||||
function relative_to_root(path) { return '<%= root_url %>'+path; };
|
|
||||||
<% if current_user.prefs.refresh != 0 -%>
|
|
||||||
setup_auto_refresh(<%= current_user.prefs["refresh"].to_i*60000 %>);
|
|
||||||
<% end -%>
|
|
||||||
<% unless controller.controller_name == 'feed' or session['noexpiry'] == "on" -%>
|
|
||||||
setup_periodic_check("<%=url_for(:controller => "login", :action => "check_expiry")%>", 5*60);
|
|
||||||
<% end -%>
|
|
||||||
setup_periodic_check("<%=check_deferred_todos_path(:format => 'js')%>", 10*60, 'POST');
|
|
||||||
<%= generate_i18n_strings %>
|
|
||||||
</script>
|
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
|
||||||
<%= favicon_link_tag 'apple-touch-icon.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
|
|
||||||
<%= auto_discovery_link_tag(:rss, {:controller => "todos", :action => "index", :format => 'rss', :token => "#{current_user.token}"}, {:title => t('layouts.next_actions_rss_feed')}) %>
|
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="Tracks" href="<%= search_plugin_path(:format => :xml) %>" />
|
|
||||||
<title><%= @page_title %></title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="<%= controller.controller_name %>">
|
|
||||||
|
|
||||||
<div id="topbar">
|
|
||||||
<%= NOTIFY_BAR.html_safe %>
|
|
||||||
|
|
||||||
<div id="date">
|
|
||||||
<h1>
|
|
||||||
<% if @count -%>
|
|
||||||
<span id="badge_count" class="badge"><%= @count %></span>
|
|
||||||
<% end -%>
|
|
||||||
<%= l(Date.today, :format => current_user.prefs.title_date_format) %>
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
<div id="minilinks">
|
|
||||||
<%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %>
|
|
||||||
|
|
|
||||||
<%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
|
|
||||||
|
|
|
||||||
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
|
|
||||||
</div>
|
|
||||||
<div id="navcontainer">
|
|
||||||
<ul class="sf-menu">
|
|
||||||
<li><%= navigation_link(t('layouts.navigation.home'), root_path, {:accesskey => "t", :title => t('layouts.navigation.home_title')} ) %></li>
|
|
||||||
<li><%= navigation_link(t('layouts.navigation.starred'), tag_path("starred"), :title => t('layouts.navigation.starred_title')) %></li>
|
|
||||||
<li><%= navigation_link(t('common.projects'), projects_path, {:accesskey=>"p", :title=>t('layouts.navigation.projects_title')} ) %></li>
|
|
||||||
<li><%= navigation_link(t('layouts.navigation.tickler'), tickler_path, {:accesskey =>"k", :title => t('layouts.navigation.tickler_title')} ) %></li>
|
|
||||||
<li><a href="#"><%= t('layouts.navigation.organize') %></a>
|
|
||||||
<ul>
|
|
||||||
<li><%= navigation_link( t('common.contexts'), contexts_path, {:accesskey=>"c", :title=>t('layouts.navigation.contexts_title')} ) %></li>
|
|
||||||
<li><%= navigation_link( t('common.notes'), notes_path, {:accesskey => "o", :title => t('layouts.navigation.notes_title')} ) %></li>
|
|
||||||
<li><%= navigation_link( t('common.review'), review_path, {:accesskey => "r", :title => t('layouts.navigation.review_title')} ) %></li>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#"><%= t('layouts.navigation.view') %></a>
|
|
||||||
<ul>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#"><%= t('layouts.navigation.admin') %></a>
|
|
||||||
<ul>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.preferences'), preferences_path, {:accesskey => "u", :title => t('layouts.navigation.preferences_title')} ) %></li>
|
|
||||||
<li><%= navigation_link( t('layouts.navigation.export'), data_path, {:accesskey => "i", :title => t('layouts.navigation.export_title')} ) %></li>
|
|
||||||
<% if current_user.is_admin? -%>
|
|
||||||
<li><%= navigation_link(t('layouts.navigation.manage_users'), users_path, {:accesskey => "a", :title => t('layouts.navigation.manage_users_title')} ) %></li>
|
|
||||||
<% end -%>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a href="#"><%= t('layouts.navigation.help') %></a>
|
|
||||||
<ul>
|
|
||||||
<li><%= link_to t('layouts.navigation.integrations_'), integrations_path %></li>
|
|
||||||
<li><%= link_to t('layouts.navigation.api_docs'), rest_api_docs_path %></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><%= navigation_link(image_tag("system-search.png", :size => "16X16", :border => 0), search_path, :title => t('layouts.navigation.search')) %></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<%= render_flash %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content" class="<%= controller.controller_name %>">
|
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= render :partial => "shared/footer" %>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -46,7 +46,7 @@ Tracksapp::Application.configure do
|
||||||
# config.action_controller.asset_host = "http://assets.example.com"
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
||||||
config.assets.precompile += %w( print.css scaffold.css mobile.css )
|
config.assets.precompile += %w( print.css login.css mobile.css )
|
||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
# Disable delivery errors, bad email addresses will be ignored
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue