mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-26 02:36:11 +01:00
Merge branch 'svn-tracking'
Up to r881 of svn repository * svn-tracking: (22 commits) Added .gitconfig Added yaml_db plugin: http://opensource.heroku.com/ applied patch from Eric from #732 fixes #730 restores ability to delete user from user management page fixes #724 where editing todos truncates the project name of the todo when the project name contains quotes (") Applied patch from Eric Pallen whcih automatically converts url's to links. Thanks Eric! explain that yaml cannot yet be used for backup as importing is not implemented yet. from mailinglist. hopefully fixes #727.Changes the check on running animation to finished animation regenerate compressed js and cleanup whitespace turns out that getElementsByClassName is removed from prototype and it therfore falls back to the function of the browser which has different semantics. Found here http://www.prototypejs.org/api/utility/getElementsByClassName forgot to create a new compressed js from the previous js changes in the stats page you can downdrill to see the active todos in a certain week from the running time charts. This patch adds the option to see all active todos from the selected week and older. fix #727. Adds a check to prevent expand/collapse while a previous expand/collaps is still animating fixed small problem where updating a todo from mobile resulted in an error becase source_view was nil fixes #726. Thanks Eric Pallen for the fix. The mobile view showed active todos from completed projects while the home page does not. merges changes from tracks1.6 to trunk prepares trunk for 1.6 release fixes #713. Adds behavior for edit/star/delete/check buttons of todo even if there is no todo to show. This makes sure that the behaviors are present when you add a new todo through AJAX. fixes #718. The link included the number of actions which resulted from last commit removed some more whitespace to reduce the download of the mobile view. ...
This commit is contained in:
commit
c1109b3fb3
49 changed files with 1871 additions and 1343 deletions
|
|
@ -481,8 +481,10 @@ class StatsController < ApplicationController
|
|||
|
||||
@chart_name = "actions_visible_running_time_data"
|
||||
@page_title = "Actions selected from week "
|
||||
@further = false
|
||||
if params['id'] == 'avrt_end'
|
||||
@page_title += week_from.to_s + " and further"
|
||||
@further = true
|
||||
else
|
||||
@page_title += week_from.to_s + " - " + week_to.to_s + ""
|
||||
end
|
||||
|
|
@ -512,8 +514,10 @@ class StatsController < ApplicationController
|
|||
|
||||
@chart_name = "actions_running_time_data"
|
||||
@page_title = "Actions selected from week "
|
||||
@further = false
|
||||
if params['id'] == 'art_end'
|
||||
@page_title += week_from.to_s + " and further"
|
||||
@further = true
|
||||
else
|
||||
@page_title += week_from.to_s + " - " + week_to.to_s + ""
|
||||
end
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ class TodosController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
@source_view = params['_source_view'] || 'todo'
|
||||
init_data_for_sidebar unless mobile?
|
||||
@todo.tag_with(params[:tag_list], current_user) if params[:tag_list]
|
||||
@original_item_context_id = @todo.context_id
|
||||
|
|
@ -461,7 +462,11 @@ class TodosController < ApplicationController
|
|||
@todos = Todo.find(:all, :conditions => ['todos.user_id = ?', current_user.id], :include => [ :project, :context, :tags ])
|
||||
|
||||
# Exclude hidden projects from the home page
|
||||
@not_done_todos = Todo.find(:all, :conditions => ['todos.user_id = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)', current_user.id, false, 'active'], :order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC", :include => [ :project, :context, :tags ])
|
||||
@not_done_todos = Todo.find(:all,
|
||||
:conditions => ['todos.user_id = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)',
|
||||
current_user.id, false, 'active'],
|
||||
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
|
||||
:include => [ :project, :context, :tags ])
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -475,8 +480,8 @@ class TodosController < ApplicationController
|
|||
|
||||
# Exclude hidden projects from the home page
|
||||
@not_done_todos = Todo.find(:all,
|
||||
:conditions => ['todos.user_id = ? AND todos.state = ? AND contexts.hide = ?',
|
||||
current_user.id, 'active', false],
|
||||
:conditions => ['todos.user_id = ? AND todos.state = ? AND contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)',
|
||||
current_user.id, 'active', false, 'active'],
|
||||
:order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC",
|
||||
:include => [ :project, :context ])
|
||||
end
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class UsersController < ApplicationController
|
|||
# DELETE /users/somelogin
|
||||
# DELETE /users/somelogin.xml
|
||||
def destroy
|
||||
@deleted_user = User.find_by_id(params[:id])
|
||||
@deleted_user = User.find_by_login(params[:id])
|
||||
@saved = @deleted_user.destroy
|
||||
@total_users = User.find(:all).size
|
||||
|
||||
|
|
|
|||
|
|
@ -22,55 +22,71 @@ module TodosHelper
|
|||
:prevent_default => true
|
||||
end
|
||||
|
||||
def remote_delete_icon
|
||||
def set_behavior_for_delete_icon
|
||||
parameters = "_source_view=#{@source_view}"
|
||||
parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
||||
str = link_to( image_tag_for_delete,
|
||||
todo_path(@todo), :id => "delete_icon_"+@todo.id.to_s,
|
||||
:class => "icon delete_icon", :title => "delete the action '#{@todo.description}'")
|
||||
apply_behavior '.item-container a.delete_icon:click', :prevent_default => true do |page|
|
||||
page.confirming "'Are you sure that you want to ' + this.title + '?'" do
|
||||
page << "itemContainer = this.up('.item-container'); itemContainer.startWaiting();"
|
||||
page << remote_to_href(:method => 'delete', :with => "'#{parameters}'", :complete => "itemContainer.stopWaiting();")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def remote_delete_icon
|
||||
str = link_to( image_tag_for_delete,
|
||||
todo_path(@todo), :id => "delete_icon_"+@todo.id.to_s,
|
||||
:class => "icon delete_icon", :title => "delete the action '#{@todo.description}'")
|
||||
set_behavior_for_delete_icon
|
||||
str
|
||||
end
|
||||
|
||||
def set_behavior_for_star_icon
|
||||
apply_behavior '.item-container a.star_item:click',
|
||||
remote_to_href(:method => 'put', :with => "{ _source_view : '#{@source_view}' }"),
|
||||
:prevent_default => true
|
||||
end
|
||||
|
||||
def remote_star_icon
|
||||
str = link_to( image_tag_for_star(@todo),
|
||||
toggle_star_todo_path(@todo),
|
||||
:class => "icon star_item", :title => "star the action '#{@todo.description}'")
|
||||
apply_behavior '.item-container a.star_item:click',
|
||||
remote_to_href(:method => 'put', :with => "{ _source_view : '#{@source_view}' }"),
|
||||
:prevent_default => true
|
||||
set_behavior_for_star_icon
|
||||
str
|
||||
end
|
||||
|
||||
def remote_edit_icon
|
||||
def set_behavior_for_edit_icon
|
||||
parameters = "_source_view=#{@source_view}"
|
||||
parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
||||
apply_behavior '.item-container a.edit_icon:click', :prevent_default => true do |page|
|
||||
page << "Effect.Pulsate(this);"
|
||||
page << remote_to_href(:method => 'get', :with => "'#{parameters}'")
|
||||
end
|
||||
end
|
||||
|
||||
def remote_edit_icon
|
||||
if !@todo.completed?
|
||||
str = link_to( image_tag_for_edit,
|
||||
edit_todo_path(@todo),
|
||||
:class => "icon edit_icon")
|
||||
apply_behavior '.item-container a.edit_icon:click', :prevent_default => true do |page|
|
||||
page << "Effect.Pulsate(this);"
|
||||
page << remote_to_href(:method => 'get', :with => "'#{parameters}'")
|
||||
end
|
||||
set_behavior_for_edit_icon
|
||||
else
|
||||
str = '<a class="icon">' + image_tag("blank.png") + "</a> "
|
||||
end
|
||||
str
|
||||
end
|
||||
|
||||
def remote_toggle_checkbox
|
||||
str = check_box_tag('item_id', toggle_check_todo_path(@todo), @todo.completed?, :class => 'item-checkbox')
|
||||
def set_behavior_for_toggle_checkbox
|
||||
parameters = "_source_view=#{@source_view}"
|
||||
parameters += "&_tag_name=#{@tag_name}" if @source_view == 'tag'
|
||||
apply_behavior '.item-container input.item-checkbox:click',
|
||||
remote_function(:url => javascript_variable('this.value'), :method => 'put',
|
||||
:with => "'#{parameters}'")
|
||||
:with => "'#{parameters}'")
|
||||
end
|
||||
|
||||
def remote_toggle_checkbox
|
||||
str = check_box_tag('item_id', toggle_check_todo_path(@todo), @todo.completed?, :class => 'item-checkbox')
|
||||
set_behavior_for_toggle_checkbox
|
||||
str
|
||||
end
|
||||
|
||||
|
|
@ -120,10 +136,10 @@ module TodosHelper
|
|||
str += @todo.project.name unless should_suppress_project
|
||||
str = "(#{str})" unless str.blank?
|
||||
else
|
||||
if (['project', 'tag', 'stats', 'search'].include?(parent_container_type))
|
||||
if (['project', 'tag', 'stats', 'search'].include?(parent_container_type))
|
||||
str << item_link_to_context( @todo )
|
||||
end
|
||||
if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && @todo.project_id
|
||||
if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && @todo.project_id
|
||||
str << item_link_to_project( @todo )
|
||||
end
|
||||
end
|
||||
|
|
@ -265,4 +281,4 @@ module TodosHelper
|
|||
image_tag("blank.png", :title =>"Star action", :class => class_str)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
@ -4,18 +4,21 @@
|
|||
<% if collapsible -%>
|
||||
<a href="#" class="container_toggle" id="toggle_c<%= context.id %>"><%= image_tag("collapse.png") %></a>
|
||||
<% apply_behavior '.container_toggle:click', :prevent_default => true do |page|
|
||||
page << "containerElem = this.up('.container')
|
||||
toggleTarget = containerElem.down('.toggle_target')
|
||||
if (Element.visible(toggleTarget))
|
||||
{
|
||||
todoItems.collapseNextActionListing(this, toggleTarget);
|
||||
todoItems.contextCollapseCookieManager.setCookie(todoItems.buildCookieName(containerElem), true)
|
||||
}
|
||||
else
|
||||
{
|
||||
todoItems.expandNextActionListing(this, toggleTarget);
|
||||
todoItems.contextCollapseCookieManager.clearCookie(todoItems.buildCookieName(containerElem))
|
||||
}
|
||||
page << " /* only handle the click if a previous click had finished its animation */
|
||||
if (todoItems.lastEffect == null || todoItems.lastEffect.state=='finished') {
|
||||
containerElem = this.up('.container')
|
||||
toggleTarget = containerElem.down('.toggle_target')
|
||||
if (Element.visible(toggleTarget))
|
||||
{
|
||||
todoItems.collapseNextActionListing(this, toggleTarget);
|
||||
todoItems.contextCollapseCookieManager.setCookie(todoItems.buildCookieName(containerElem), true)
|
||||
}
|
||||
else
|
||||
{
|
||||
todoItems.expandNextActionListing(this, toggleTarget);
|
||||
todoItems.contextCollapseCookieManager.clearCookie(todoItems.buildCookieName(containerElem))
|
||||
}
|
||||
}
|
||||
"
|
||||
end
|
||||
%>
|
||||
|
|
@ -31,6 +34,14 @@
|
|||
<div id="c<%= context.id %>empty-nd" style="display:<%= @not_done.empty? ? 'block' : 'none'%>;">
|
||||
<div class="message"><p>Currently there are no incomplete actions in this context</p></div>
|
||||
</div>
|
||||
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "context" } %>
|
||||
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "context" } %>
|
||||
<% if @not_done.empty?
|
||||
# fix (hack) for #713
|
||||
set_behavior_for_delete_icon
|
||||
set_behavior_for_star_icon
|
||||
set_behavior_for_edit_icon
|
||||
set_behavior_for_toggle_checkbox
|
||||
end
|
||||
-%>
|
||||
</div><!-- [end:items] -->
|
||||
</div><!-- [end:c<%= context.id %>] -->
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
if not @not_done.empty?
|
||||
# only show a context when there are actions in it
|
||||
%>
|
||||
<h2><%=mobile_context.name%></h2>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%= render :partial => "todos/mobile_todo",
|
||||
:collection => @not_done,
|
||||
:locals => { :parent_container_type => "context" }%>
|
||||
</table>
|
||||
-%>
|
||||
<h2><%=mobile_context.name%></h2>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%= render :partial => "todos/mobile_todo",
|
||||
:collection => @not_done,
|
||||
:locals => { :parent_container_type => "context" }-%>
|
||||
</table>
|
||||
<% end -%>
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
<% context = mobile_context_listing %>
|
||||
<div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %></div>
|
||||
<% context = mobile_context_listing -%>
|
||||
<div id="ctx"><%= link_to context.name, formatted_context_path(context, :m) %><%= " (" + count_undone_todos_phrase(context,"actions") + ")" %></div>
|
||||
|
|
@ -1,6 +1,2 @@
|
|||
<h2>Visible Contexts</h2>
|
||||
<%= render :partial => 'mobile_context_listing', :collection => @active_contexts%>
|
||||
|
||||
<h2>Hidden Contexts</h2>
|
||||
<%= render :partial => 'mobile_context_listing', :collection => @hidden_contexts %>
|
||||
|
||||
<h2>Visible Contexts</h2><%= render :partial => 'mobile_context_listing', :collection => @active_contexts %>
|
||||
<h2>Hidden Contexts</h2><%= render :partial => 'mobile_context_listing', :collection => @hidden_contexts %>
|
||||
|
|
@ -3,10 +3,10 @@
|
|||
<h3>Exporting data</h3>
|
||||
<p>You can choose between the following formats:</p>
|
||||
<ul>
|
||||
<li><strong>YAML: </strong>Best for porting data between Tracks installations</li>
|
||||
<li><strong>YAML: </strong>Best for exporting data. <br/><i>Please note that Tracks currently does not support importing YAML files. Do not use this (yet) to backup your Tracks database.</i></li>
|
||||
<li><strong>CSV: </strong>Best for importing into spreadsheet or data analysis software</li>
|
||||
<li><strong>XML: </strong>Best for importing or repurposing the data</li>
|
||||
</ul
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -1,50 +1,32 @@
|
|||
<ul>
|
||||
<li>
|
||||
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) %>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) %>
|
||||
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) %>
|
||||
Last 15 actions
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link( { :controller => 'todos', :action => 'index' } ) %>
|
||||
<%= text_formatted_link( { :controller => 'todos', :action => 'index' } ) %>
|
||||
<%= ical_formatted_link( { :controller => 'todos', :action => 'index' } ) %>
|
||||
All actions
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) %>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) %>
|
||||
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) %>
|
||||
Actions due today or earlier
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) %>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) %>
|
||||
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) %>
|
||||
Actions due in 7 days or earlier
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) %>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) %>
|
||||
Actions completed in the last 7 days
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link({:controller => 'contexts', :action => 'index'}) %>
|
||||
<%= text_formatted_link({:controller => 'contexts', :action => 'index'}) %>
|
||||
All Contexts
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link({:controller => 'projects', :action => 'index'}) %>
|
||||
<%= text_formatted_link({:controller => 'projects', :action => 'index'}) %>
|
||||
All Projects
|
||||
</li>
|
||||
<li>
|
||||
<%= rss_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
|
||||
<%= text_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
|
||||
Active projects with no next actions
|
||||
</li>
|
||||
<li>
|
||||
<%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %>
|
||||
Active projects with their actions
|
||||
</li>
|
||||
</ul>
|
||||
<li><%= rss_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) -%>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) -%>
|
||||
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :limit => 15 }) -%>
|
||||
Last 15 actions</li>
|
||||
<li><%= rss_formatted_link( { :controller => 'todos', :action => 'index' } ) -%>
|
||||
<%= text_formatted_link( { :controller => 'todos', :action => 'index' } ) -%>
|
||||
<%= ical_formatted_link( { :controller => 'todos', :action => 'index' } ) -%>
|
||||
All actions</li>
|
||||
<li><%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) -%>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) -%>
|
||||
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 0 }) -%>
|
||||
Actions due today or earlier</li>
|
||||
<li><%= rss_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) -%>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) -%>
|
||||
<%= ical_formatted_link({ :controller => 'todos', :action => 'index', :due => 6 }) -%>
|
||||
Actions due in 7 days or earlier</li>
|
||||
<li><%= rss_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) -%>
|
||||
<%= text_formatted_link({ :controller => 'todos', :action => 'index', :done => 7 }) -%>
|
||||
Actions completed in the last 7 days</li>
|
||||
<li><%= rss_formatted_link({:controller => 'contexts', :action => 'index'}) -%>
|
||||
<%= text_formatted_link({:controller => 'contexts', :action => 'index'}) -%>
|
||||
All Contexts</li>
|
||||
<li><%= rss_formatted_link({:controller => 'projects', :action => 'index'}) -%>
|
||||
<%= text_formatted_link({:controller => 'projects', :action => 'index'}) -%>
|
||||
All Projects</li>
|
||||
<li><%= rss_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
|
||||
<%= text_formatted_link({:controller => 'projects', :action => 'index', :only_active_with_no_next_actions => true}) %>
|
||||
Active projects with no next actions</li>
|
||||
<li><%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %>
|
||||
Active projects with their actions
|
||||
</li></ul>
|
||||
|
|
@ -1,37 +1,32 @@
|
|||
<!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" />
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<%= stylesheet_link_tag "mobile" %>
|
||||
<title><%= @page_title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<% if !(@new_mobile || @edit_mobile)
|
||||
if !@prefs.nil? %>
|
||||
<h1><span class="count"><%= @down_count %></span> <%=
|
||||
user_time.strftime(@prefs.title_date_format) %></h1>
|
||||
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") %>
|
||||
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") %>
|
||||
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
|
||||
<% end
|
||||
end %>
|
||||
<%= render_flash -%>
|
||||
<hr/>
|
||||
<%= yield %>
|
||||
<hr/>
|
||||
<% if !@prefs.nil? %>
|
||||
<%= link_to "Logout", formatted_logout_path(:format => 'm') %> |
|
||||
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") %>
|
||||
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") %>
|
||||
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})+" | ") -%>
|
||||
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
|
||||
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) %>
|
||||
<% end %>
|
||||
<%= render :partial => "shared/mobile_footer" %>
|
||||
</body>
|
||||
</html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="initial-scale = 1.0" />
|
||||
<%= stylesheet_link_tag "mobile"%>
|
||||
<title><%= @page_title %></title>
|
||||
</head><body>
|
||||
<% if !(@new_mobile || @edit_mobile)
|
||||
if !@prefs.nil? -%>
|
||||
<h1><span class="count"><%= @down_count %></span> <%=
|
||||
user_time.strftime(@prefs.title_date_format) -%></h1>
|
||||
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") -%>
|
||||
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") -%>
|
||||
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
|
||||
<% end
|
||||
end -%><%= render_flash -%>
|
||||
<hr/><%= yield -%>
|
||||
<hr/><% if !@prefs.nil? -%>
|
||||
<%= (link_to("Logout", formatted_logout_path(:format => 'm')) +" | ") -%>
|
||||
<%= (link_to("Add new action", formatted_new_todo_path(:m))+" | ") unless @new_mobile -%>
|
||||
<%= (link_to("Home", formatted_todos_path(:m))+" | ") unless @home -%>
|
||||
<%= (link_to("Contexts", formatted_contexts_path(:m))+" | ") -%>
|
||||
<%= (link_to("Projects", formatted_projects_path(:m))+" | ") -%>
|
||||
<%= (link_to("Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})+" | ") -%>
|
||||
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
|
||||
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
|
||||
<% end -%>
|
||||
<%= render :partial => "shared/mobile_footer" -%>
|
||||
</body></html>
|
||||
|
|
@ -37,11 +37,10 @@ window.onload=function(){
|
|||
</div>
|
||||
<div id="minilinks">
|
||||
<%= link_to_function("Toggle notes", nil, {:accesskey => "S", :title => "Toggle all notes", :id => "toggle-notes-nav"}) do |page|
|
||||
page.select('body .todo_notes').each { |e| e.toggle }
|
||||
end
|
||||
-%> |
|
||||
<%= link_to "Logout (#{current_user.display_name}) »", logout_path %>
|
||||
<% end %>
|
||||
page.select('body .todo_notes').each { |e| e.toggle }
|
||||
end
|
||||
-%> |
|
||||
<%= link_to "Logout (#{current_user.display_name}) »", logout_path %>
|
||||
</div>
|
||||
|
||||
<div id="navcontainer">
|
||||
|
|
|
|||
|
|
@ -1,39 +1,39 @@
|
|||
<% note = notes -%>
|
||||
<div id="<%= dom_id(note, 'container') %>">
|
||||
<h2><%= link_to("Note #{note.id}", note_path(note), :title => "Show note #{note.id}" ) %></h2>
|
||||
<h2><%= link_to("Note #{note.id}", note_path(note), :title => "Show note #{note.id}" ) %></h2>
|
||||
<div id="<%= dom_id(note) %>">
|
||||
<%= sanitize(textilize(note.body)) %>
|
||||
|
||||
<div class="note_footer">
|
||||
<%= link_to_remote(
|
||||
<%= sanitize(textilize(note.body.gsub(/((https?:\/\/[^ \n\t]*))/, '"\1":\2'))) %>
|
||||
|
||||
<div class="note_footer">
|
||||
<%= link_to_remote(
|
||||
image_tag("blank.png",
|
||||
:title =>"Delete this note",
|
||||
:class=>"delete_item",
|
||||
:id => "delete_note_"+note.id.to_s),
|
||||
:title =>"Delete this note",
|
||||
:class=>"delete_item",
|
||||
:id => "delete_note_"+note.id.to_s),
|
||||
:update => dom_id(note),
|
||||
:loading => visual_effect(:fade, dom_id(note, 'container')),
|
||||
:complete => "Element.remove('#{dom_id(note, 'container')}');",
|
||||
:url => note_path(note),
|
||||
:method => :delete,
|
||||
:confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?" ) + " " -%>
|
||||
<%= link_to_function(image_tag( "blank.png", :title => "Edit item", :class=>"edit_item"),
|
||||
"Element.toggle('#{dom_id(note)}'); Element.toggle('#{dom_id(note, 'edit')}'); Effect.Appear('#{dom_id(note, 'edit')}'); Form.focusFirstElement('#{dom_id(note, 'edit_form')}');" ) + " | " %>
|
||||
<%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %> |
|
||||
Created: <%= format_date(note.created_at) %>
|
||||
<% if note.updated_at? -%>
|
||||
| Modified: <%= format_date(note.updated_at) %>
|
||||
<%= link_to_function(image_tag( "blank.png", :title => "Edit item", :class=>"edit_item"),
|
||||
"Element.toggle('#{dom_id(note)}'); Element.toggle('#{dom_id(note, 'edit')}'); Effect.Appear('#{dom_id(note, 'edit')}'); Form.focusFirstElement('#{dom_id(note, 'edit_form')}');" ) + " | " %>
|
||||
<%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %> |
|
||||
Created: <%= format_date(note.created_at) %>
|
||||
<% if note.updated_at? -%>
|
||||
| Modified: <%= format_date(note.updated_at) %>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(note, 'edit') %>" class="edit-form" style="display:none;">
|
||||
<% form_remote_tag :url => note_path(note),
|
||||
:method => :put,
|
||||
:html => { :id => dom_id(note, 'edit_form'), :class => "inline-form" },
|
||||
:update => dom_id(note, 'container'),
|
||||
:complete => visual_effect(:appear, dom_id(note, 'container')) do -%>
|
||||
<%= render :partial => "notes/note_edit_form", :object => note %>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(note, 'edit') %>" class="edit-form" style="display:none;">
|
||||
<% form_remote_tag :url => note_path(note),
|
||||
:method => :put,
|
||||
:html => { :id => dom_id(note, 'edit_form'), :class => "inline-form" },
|
||||
:update => dom_id(note, 'container'),
|
||||
:complete => visual_effect(:appear, dom_id(note, 'container')) do -%>
|
||||
<%= render :partial => "notes/note_edit_form", :object => note %>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
<% note = nil -%>
|
||||
<% note = nil -%>
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
<% project = mobile_project_listing %>
|
||||
<div id="pjr"><%= link_to project.name, formatted_project_path(project) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %></div>
|
||||
<% project = mobile_project_listing -%>
|
||||
<div id="pjr"><%=
|
||||
link_to(project.name, formatted_project_path(project)) +
|
||||
" (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %></div>
|
||||
|
|
@ -22,5 +22,13 @@
|
|||
<div class="message"><p>Currently there are no incomplete actions in this project</p></div>
|
||||
</div>
|
||||
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "project" } %>
|
||||
<% if @not_done.empty?
|
||||
# fix (hack) for #713
|
||||
set_behavior_for_delete_icon
|
||||
set_behavior_for_star_icon
|
||||
set_behavior_for_edit_icon
|
||||
set_behavior_for_toggle_checkbox
|
||||
end
|
||||
-%>
|
||||
</div><!-- [end:items] -->
|
||||
</div><!-- [end:p<%= project.id %>] -->
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
<h2>Active projects</h2>
|
||||
<%= render :partial => 'mobile_project_listing', :collection => @active_projects%>
|
||||
|
||||
<h2>Hidden projects</h2>
|
||||
<%= render :partial => 'mobile_project_listing', :collection => @hidden_projects %>
|
||||
|
||||
<h2>Completed projects</h2>
|
||||
<%= render :partial => 'mobile_project_listing', :collection => @completed_projects %>
|
||||
<h2>Active projects</h2><%=
|
||||
render :partial => 'mobile_project_listing', :collection => @active_projects%>
|
||||
<h2>Hidden projects</h2><%=
|
||||
render :partial => 'mobile_project_listing', :collection => @hidden_projects %>
|
||||
<h2>Completed projects</h2><%=
|
||||
render :partial => 'mobile_project_listing', :collection => @completed_projects %>
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
<div id="message_holder">
|
||||
<% if flash.empty? %>
|
||||
<% if flash.empty? -%>
|
||||
<h4 id="flash" class="alert" style="display:none"></h4>
|
||||
<% else %>
|
||||
<% else -%>
|
||||
<% flash.each do |key,value| -%>
|
||||
<h4 id="flash" class='alert <%= key %>'>
|
||||
<%= value %>
|
||||
</h4>
|
||||
<h4 id="flash" class='alert <%= key %>'><%= value %></h4>
|
||||
<% end -%>
|
||||
<% end %>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
|
@ -1,3 +1 @@
|
|||
<div class="footer">
|
||||
<p>Mobile Tracks <%= TRACKS_VERSION %>: <a href="mailto:butshesagirl@rousette.org.uk?subject=Tracks feedback">Email</a> | <a href="http://www.rousette.org.uk/projects/">Website</a> | <a href="http://www.rousette.org.uk/projects/tracks/contribute">Contribute</a></p>
|
||||
</div>
|
||||
<div class="footer"><p>Mobile Tracks <%= TRACKS_VERSION %>: <a href="mailto:butshesagirl@rousette.org.uk?subject=Tracks feedback">Email</a> | <a href="http://www.rousette.org.uk/projects/">Website</a> | <a href="http://www.rousette.org.uk/projects/tracks/contribute">Contribute</a></p></div>
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
<%= render :partial => 'chart', :locals => {:width => @chart_width, :height => @chart_height, :data => url_for(:action => @chart_name)} -%>
|
||||
<br/>
|
||||
<p>Click on a bar in the chart to update the actions below. Click <%=link_to "here", {:controller => "stats", :action => "index"} %> to return to the statistics page</p>
|
||||
<p>Click on a bar in the chart to update the actions below. Click <%=link_to "here", {:controller => "stats", :action => "index"} %> to return to the statistics page. <%
|
||||
unless @further -%> <%=
|
||||
"Click " +
|
||||
link_to("here", {:controller => "stats", :action => "show_selected_actions_from_chart", :id=>"#{params[:id]}_end", :index => params[:index]})+
|
||||
" to show the actions from week " + params[:index] + " and further." -%>
|
||||
<% end %></p>
|
||||
<br/>
|
||||
<div class="container tickler" id="tickler_container">
|
||||
<h2>
|
||||
<%= @page_title -%>
|
||||
</h2>
|
||||
|
||||
<h2><%= @page_title -%></h2>
|
||||
<div id="tickler" class="items toggle_target">
|
||||
<div id="tickler-empty-nd" style="display:<%= @selected_actions.empty? ? 'block' : 'none'%>;">
|
||||
<div class="message"><p>There are no actions selected</p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "todos/todo", :collection => @selected_actions, :locals => { :parent_container_type => 'stats' } %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<div class="project_input">
|
||||
<label for="<%= dom_id(@todo, 'project_name') %>">Project</label>
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" tabindex="10" size="30" type="text" value="<%= @todo.project.nil? ? 'None' : @todo.project.name %>" />
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" tabindex="10" size="30" type="text" value="<%= @todo.project.nil? ? 'None' : @todo.project.name.gsub(/"/,""") %>" />
|
||||
<div class="page_name_auto_complete" id="<%= dom_id(@todo, 'project_list') %>" style="display:none"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<% if @not_done_todos.empty? -%>
|
||||
<p>There are no incomplete actions</p>
|
||||
<p>There are no incomplete actions</p>
|
||||
<% else -%>
|
||||
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show %>
|
||||
<% end -%>
|
||||
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show -%>
|
||||
<% end -%>
|
||||
|
|
@ -5,24 +5,22 @@ else
|
|||
bullet = "<span class=r>» </span>"
|
||||
end -%>
|
||||
<div class="t" id="<%= dom_id(mobile_todo) %>">
|
||||
<tr valign="top"><td><%= bullet %></td><td>
|
||||
<% if mobile_todo.completed? -%>
|
||||
<span class="m_t_d">
|
||||
<% else -%>
|
||||
<span class="m_t">
|
||||
<% end -%>
|
||||
<%= date_span -%>
|
||||
<%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) %>
|
||||
<% if parent_container_type == 'context' or parent_container_type == 'tag' -%>
|
||||
<%= "<span class=prj>(" +
|
||||
link_to(mobile_todo.project.name, formatted_project_path(mobile_todo.project, :m)) +
|
||||
")</span>" unless mobile_todo.project.nil? %>
|
||||
<% end
|
||||
<tr valign="top"><td><%= bullet %></td><td><%
|
||||
if mobile_todo.completed?
|
||||
-%><span class="m_t_d">
|
||||
<% else
|
||||
-%><span class="m_t">
|
||||
<% end -%>
|
||||
<%= date_span -%> <%= link_to mobile_todo.description, formatted_todo_path(mobile_todo, :m) -%>
|
||||
<% if parent_container_type == 'context' or parent_container_type == 'tag' -%>
|
||||
<%= "<span class=prj> (" +
|
||||
link_to(mobile_todo.project.name, formatted_project_path(mobile_todo.project, :m)) +
|
||||
")</span>" unless mobile_todo.project.nil? -%>
|
||||
<% end
|
||||
if parent_container_type == 'project' or parent_container_type == 'tag' -%>
|
||||
<%= "<span class=ctx>(" +
|
||||
link_to(mobile_todo.context.name, formatted_context_path(mobile_todo.context, :m)) +
|
||||
")</span>" %>
|
||||
<% end -%>
|
||||
<%= tag_list_mobile %>
|
||||
</span>
|
||||
</td></tr></div>
|
||||
<%= "<span class=ctx> (" +
|
||||
link_to(mobile_todo.context.name, formatted_context_path(mobile_todo.context, :m)) +
|
||||
")</span>" -%>
|
||||
<% end -%>
|
||||
<%= tag_list_mobile -%>
|
||||
</span></td></tr></div>
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
<%= link_to(image_tag( 'blank.png', :width=>'16', :height=>'16', :border=>'0' ), "#", {:class => 'show_notes', :title => 'Show notes'}) %>
|
||||
<% apply_behavior 'a.show_notes:click', :prevent_default => true do |page, element|
|
||||
element.next('.todo_notes').toggle
|
||||
end
|
||||
-%>
|
||||
<div class="todo_notes" id="<%= dom_id(item, 'notes') %>" style="display:none">
|
||||
<%= markdown( item.notes ) %>
|
||||
</div>
|
||||
element.next('.todo_notes').toggle
|
||||
end -%>
|
||||
<div class="todo_notes" id="<%= dom_id(item, 'notes') %>" style="display:none">
|
||||
<%= markdown( item.notes.gsub(/((https?:\/\/[^ \n\t]*))/, '"\1":\2') ) %>
|
||||
</div>
|
||||
|
|
@ -1 +1 @@
|
|||
<%= render :partial => 'mobile_actions' %>
|
||||
<%= render :partial => 'mobile_actions' -%>
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
<% if @count == 0 -%>
|
||||
<div class="message"><p>Currently there are no deferred actions.</p></div>
|
||||
<% end -%>
|
||||
|
||||
<%= render :partial => "contexts/mobile_context", :collection => @contexts,
|
||||
:locals => { :collapsible => true } %>
|
||||
:locals => { :collapsible => true } -%>
|
||||
|
|
@ -1,28 +1,25 @@
|
|||
<div id="display_box">
|
||||
<div class="container context" <%= "style=\"display:none\"" unless @not_done_todos.empty? %>>
|
||||
<h2>
|
||||
No actions found
|
||||
</h2>
|
||||
<div class="message"><p>Currently there are no incomplete actions with the tag '<%= @tag_name %>'</p></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show %>
|
||||
|
||||
<h2>Deferred actions with the tag <%= @tag_name %></h2>
|
||||
<% unless (@deferred.nil? or @deferred.size == 0) -%>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%= render :partial => "todos/mobile_todo", :collection => @deferred, :locals => { :parent_container_type => "tag" } %>
|
||||
</table>
|
||||
<% else %>
|
||||
No deferred actions with the tag <%= @tag_name %>
|
||||
<% if @not_done_todos.empty? -%>
|
||||
<div class="container context">
|
||||
<h2>No actions found</h2>
|
||||
<div class="message">Currently there are no incomplete actions with the tag '<%= @tag_name %>'</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<h2>Completed actions with the tag <%= @tag_name %></h2>
|
||||
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show -%>
|
||||
<h2>Deferred actions with the tag <%= @tag_name %></h2>
|
||||
<% unless (@deferred.nil? or @deferred.size == 0) -%>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%= render :partial => "todos/mobile_todo", :collection => @deferred, :locals => { :parent_container_type => "tag" } -%>
|
||||
</table>
|
||||
<% else -%>
|
||||
No deferred actions with the tag <%= @tag_name %>
|
||||
<% end -%>
|
||||
<h2>Completed actions with the tag <%= @tag_name %></h2>
|
||||
<% unless (@done.nil? or @done.size == 0) -%>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%= render :partial => "todos/mobile_todo", :collection => @done, :locals => { :parent_container_type => "tag" } %>
|
||||
</table>
|
||||
<% else %>
|
||||
No completed actions with the tag <%= @tag_name %>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<%= render :partial => "todos/mobile_todo", :collection => @done, :locals => { :parent_container_type => "tag" } %>
|
||||
</table>
|
||||
<% else -%>
|
||||
No completed actions with the tag <%= @tag_name %>
|
||||
<% end -%>
|
||||
</div><!-- End of display_box -->
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue