Changed code to support basic i18n.

Added RubyMine configuration and rvm setup to .gitignore.
This commit is contained in:
Marcus Ilgner 2010-10-31 21:27:13 +08:00 committed by Reinier Balt
parent 04faa5d408
commit fd3f69d927
99 changed files with 1157 additions and 601 deletions

2
.gitignore vendored
View file

@ -18,3 +18,5 @@ rerun.txt
public/javascripts/jquery-all.js
public/javascripts/tracks.js
public/stylesheets/all.css
.idea
.rvmrc

View file

@ -33,8 +33,10 @@ class ApplicationController < ActionController::Base
before_filter :set_session_expiration
before_filter :set_time_zone
before_filter :set_zindex_counter
before_filter :set_locale
prepend_before_filter :login_required
prepend_before_filter :enable_mobile_content_negotiation
after_filter :set_locale
after_filter :set_charset
include ActionView::Helpers::TextHelper
@ -47,6 +49,12 @@ class ApplicationController < ActionController::Base
headers["Content-Type"] ||= "text/html; charset=UTF-8"
end
def set_locale
locale = params[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^[a-z]{2}/).first
I18n.locale = I18n::available_locales.include?(locale) ? locale : I18n.default_locale
logger.debug("Selected '#{I18n.locale}' as locale")
end
def set_session_expiration
# http://wiki.rubyonrails.com/rails/show/HowtoChangeSessionOptions
unless session == nil
@ -196,7 +204,7 @@ class ApplicationController < ActionController::Base
def admin_login_required
unless User.find_by_id_and_is_admin(session['user_id'], true)
render :text => "401 Unauthorized: Only admin users are allowed access to this function.", :status => 401
render :text => t('errors.user_unauthorized'), :status => 401
return false
end
end

View file

@ -50,7 +50,7 @@ class LoginController < ApplicationController
return
else
@login = params['user_login']
notify :warning, "Login unsuccessful"
notify :warning, t('login.unsuccessful')
end
when :get
if User.no_users_yet?
@ -73,7 +73,7 @@ class LoginController < ApplicationController
CASClient::Frameworks::Rails::Filter.logout(self)
else
reset_session
notify :notice, "You have been logged out of Tracks."
notify :notice, t('login.logged_out')
redirect_to_login
end
end
@ -88,7 +88,7 @@ class LoginController < ApplicationController
expiry_time = session['expiry_time'] || Time.now + 10
@time_left = expiry_time - Time.now
if @time_left < (10*60) # Session will time out before the next check
@msg = "Session has timed out. Please "
@msg = 'login.session_time_out'
else
@msg = ""
end
@ -107,8 +107,8 @@ class LoginController < ApplicationController
if session[:cas_user]
if @user = User.find_by_login(session[:cas_user])
session['user_id'] = @user.id
msg = (should_expire_sessions?) ? "will expire after 1 hour of inactivity." : "will not expire."
notify :notice, "Login successful: session #{msg}"
msg = (should_expire_sessions?) ? t('login.session_will_expire', :hours => 1) : t('login.session_will_not_expire')
notify :notice, (t('login.successful_with_session_info') + msg)
cookies[:tracks_login] = { :value => @user.login, :expires => Time.now + 1.year, :secure => SITE_CONFIG['secure_cookies'] }
unless should_expire_sessions?
@user.remember_me
@ -116,7 +116,7 @@ class LoginController < ApplicationController
end
#redirect_back_or_home
else
notify :warning, "Sorry, no user by that CAS username exists (#{session[:cas_user]})"
notify :warning, t('login.cas_username_not_found', :username => session[:cas_user])
redirect_to signup_url ; return
end
else
@ -149,8 +149,8 @@ class LoginController < ApplicationController
if result.successful?
if @user = User.find_by_open_id_url(identity_url)
session['user_id'] = @user.id
msg = (should_expire_sessions?) ? "will expire after 1 hour of inactivity." : "will not expire."
notify :notice, "Login successful: session #{msg}"
msg = (should_expire_sessions?) ? t('login.session_will_expire', :hours => 1) : t('login.session_will_not_expire')
notify :notice, (t('login.successful_with_session_info') + msg)
cookies[:tracks_login] = { :value => @user.login, :expires => Time.now + 1.year, :secure => SITE_CONFIG['secure_cookies'] }
unless should_expire_sessions?
@user.remember_me
@ -158,7 +158,7 @@ class LoginController < ApplicationController
end
redirect_back_or_home
else
notify :warning, "Sorry, no user by that identity URL exists (#{identity_url})"
notify :warning, t('login.openid_identity_url_not_found', :identity_url => identity_url)
end
else
notify :warning, result.message

View file

@ -14,7 +14,7 @@ class RecurringTodosController < ApplicationController
@no_completed_recurring_todos = @completed_recurring_todos.size == 0
@count = @recurring_todos.size
@page_title = "TRACKS::Recurring Actions"
@page_title = t('todos.recurring_actions_title')
end
def new

10
app/controllers/stats_controller.rb Executable file → Normal file
View file

@ -376,7 +376,7 @@ class StatsController < ApplicationController
end
if size==pie_cutoff
@actions_per_context[size-1]['name']='(others)'
@actions_per_context[size-1]['name']=t('stats.other_actions_label')
@actions_per_context[size-1]['total']=0
@actions_per_context[size-1]['id']=-1
(size-1).upto @all_actions_per_context.size()-1 do |i|
@ -417,7 +417,7 @@ class StatsController < ApplicationController
end
if size==pie_cutoff
@actions_per_context[size-1]['name']='(others)'
@actions_per_context[size-1]['name']=t('stats.other_actions_label')
@actions_per_context[size-1]['total']=0
@actions_per_context[size-1]['id']=-1
(size-1).upto @all_actions_per_context.size()-1 do |i|
@ -565,7 +565,7 @@ class StatsController < ApplicationController
end
def show_selected_actions_from_chart
@page_title = "TRACKS::Action selection"
@page_title = t('stats.action_selection_title')
@count = 99
@source_view = 'stats'
@ -582,10 +582,10 @@ class StatsController < ApplicationController
week_to = week_from+1
@chart_name = "actions_visible_running_time_data"
@page_title = "Actions selected from week "
@page_title = t('stats.actions_selected_from_week')
@further = false
if params['id'] == 'avrt_end'
@page_title += week_from.to_s + " and further"
@page_title += week_from.to_s + t('stats.actions_further')
@further = true
else
@page_title += week_from.to_s + " - " + week_to.to_s + ""

View file

@ -13,13 +13,13 @@ module RecurringTodosHelper
def recurring_todo_remote_delete_icon
link_to( image_tag_for_delete,
recurring_todo_path(@recurring_todo), :id => "delete_icon_"+@recurring_todo.id.to_s,
:class => "icon delete_icon", :title => "delete the recurring action '#{@recurring_todo.description}'")
:class => "icon delete_icon", :title => t('todos.delete_recurring_action', :description => @recurring_todo.description))
end
def recurring_todo_remote_star_icon
link_to( image_tag_for_star(@recurring_todo),
toggle_star_recurring_todo_path(@recurring_todo),
:class => "icon star_item", :title => "star the action '#{@recurring_todo.description}'")
:class => "icon star_item", :title => t('todos.star_action'))
end
def recurring_todo_remote_edit_icon
@ -41,10 +41,10 @@ module RecurringTodosHelper
private
def image_tag_for_delete
image_tag("blank.png", :title =>"Delete action", :class=>"delete_item")
image_tag("blank.png", :title =>t('todos.delete_action'), :class=>"delete_item")
end
def image_tag_for_edit(todo)
image_tag("blank.png", :title =>"Edit action", :class=>"edit_item", :id=> dom_id(todo, 'edit_icon'))
image_tag("blank.png", :title =>t('todos.edit_action'), :class=>"edit_item", :id=> dom_id(todo, 'edit_icon'))
end
end

View file

@ -21,26 +21,26 @@ module TodosHelper
def remote_star_icon
link_to( image_tag_for_star(@todo),
toggle_star_todo_path(@todo),
:class => "icon star_item", :title => "star the action '#{@todo.description}'")
:class => "icon star_item", :title => t('todos.star_action_with_description', :description => @todo.description))
end
def remote_edit_button
link_to(
image_tag("blank.png", :alt => "Edit", :align => "absmiddle", :id => 'edit_icon_todo_'+@todo.id.to_s, :class => 'edit_item'),
image_tag("blank.png", :alt => t('todos.edit'), :align => "absmiddle", :id => 'edit_icon_todo_'+@todo.id.to_s, :class => 'edit_item'),
{:controller => 'todos', :action => 'edit', :id => @todo.id},
:class => "icon edit_item",
:title => "Edit the action '#{@todo.description}'")
:title => t('todos.edit_action_with_description', :description => @todo.description))
end
def remote_delete_menu_item(parameters, todo)
return link_to_remote(
image_tag("delete_off.png", :mouseover => "delete_on.png", :alt => "Delete", :align => "absmiddle")+" Delete",
image_tag("delete_off.png", :mouseover => "delete_on.png", :alt => t('todos.delete'), :align => "absmiddle")+" "+t('todos.delete'),
:url => {:controller => 'todos', :action => 'destroy', :id => todo.id},
:method => 'delete',
:with => "'#{parameters}'",
:before => todo_start_waiting_js(todo),
:complete => todo_stop_waiting_js(todo),
:confirm => "Are you sure that you want to delete the action '#{todo.description}'?")
:confirm => t('todos.confirm_delete', :description => todo.description))
end
def remote_defer_menu_item(days, todo)
@ -51,12 +51,12 @@ module TodosHelper
futuredate = (@todo.show_from || @todo.user.date) + days.days
if @todo.due && futuredate > @todo.due
return link_to_function(
image_tag("defer_#{days}_off.png", :mouseover => "defer_#{days}.png", :alt => "Defer #{pluralize(days, "day")}", :align => "absmiddle")+" Defer #{pluralize(days, "day")}",
"alert('Defer date is after due date. Please edit and adjust due date before deferring.')"
image_tag("defer_#{days}_off.png", :mouseover => "defer_#{days}.png", :alt => t('todos.defer_x_days', :count => days), :align => "absmiddle")+" "+t('todos.defer_x_days', :count => days),
"alert('#{t('todos.defer_date_after_due_date')}')"
)
else
return link_to_remote(
image_tag("defer_#{days}_off.png", :mouseover => "defer_#{days}.png", :alt => "Defer #{pluralize(days, "day")}", :align => "absmiddle")+" Defer #{pluralize(days, "day")}",
image_tag("defer_#{days}_off.png", :mouseover => "defer_#{days}.png", :alt => t('todos.defer_x_days', :count => days), :align => "absmiddle")+" "+t('todos.defer_x_days', :count => days),
:url => url,
:before => todo_start_waiting_js(todo),
:complete => todo_stop_waiting_js(todo))
@ -68,7 +68,7 @@ module TodosHelper
:_source_view => (@source_view.underscore.gsub(/\s+/,'_') rescue "")}
url[:_tag_name] = @tag_name if @source_view == 'tag'
return link_to(image_tag("to_project_off.png", :align => "absmiddle")+" Make project", url)
return link_to(image_tag("to_project_off.png", :align => "absmiddle")+" " + t('todos.convert_to_project'), url)
end
def todo_start_waiting_js(todo)
@ -93,14 +93,14 @@ module TodosHelper
def remote_toggle_checkbox
check_box_tag('item_id', toggle_check_todo_path(@todo), @todo.completed?, :class => 'item-checkbox',
:title => @todo.pending? ? 'Blocked by ' + @todo.uncompleted_predecessors.map(&:description).join(', ') : "", :readonly => @todo.pending?)
:title => @todo.pending? ? t('todos.blocked_by', :predecessors => @todo.uncompleted_predecessors.map(&:description).join(', ')) : "", :readonly => @todo.pending?)
end
def date_span
if @todo.completed?
"<span class=\"grey\">#{format_date( @todo.completed_at )}</span>"
elsif @todo.pending?
"<a title='Depends on: #{@todo.uncompleted_predecessors.map(&:description).join(', ')}'><span class=\"orange\">Pending</span></a> "
"<a title='#{t('todos.depends_on')}: #{@todo.uncompleted_predecessors.map(&:description).join(', ')}'><span class=\"orange\">#{t('todos.pending')}</span></a> "
elsif @todo.deferred?
show_date( @todo.show_from )
else
@ -111,7 +111,7 @@ module TodosHelper
def successors_span
unless @todo.pending_successors.empty?
pending_count = @todo.pending_successors.length
title = "Has #{pluralize(pending_count, 'pending action')}: #{@todo.pending_successors.map(&:description).join(', ')}"
title = "#{t('todos.has_x_pending', :count => pending_count)}: #{@todo.pending_successors.map(&:description).join(', ')}"
image_tag( 'successor_off.png', :width=>'10', :height=>'16', :border=>'0', :title => title )
end
end
@ -119,7 +119,7 @@ module TodosHelper
def grip_span
unless @todo.completed?
image_tag('grip.png', :width => '7', :height => '16', :border => '0',
:title => 'Drag onto another action to make it depend on that action',
:title => t('todos.drag_action_title'),
:class => 'grip')
end
end
@ -150,7 +150,7 @@ module TodosHelper
def deferred_due_date
if @todo.deferred? && @todo.due
"(action due on #{format_date(@todo.due)})"
t('todos.action_due_on', :date => format_date(@todo.due))
end
end
@ -207,21 +207,21 @@ module TodosHelper
case days
# overdue or due very soon! sound the alarm!
when -1000..-1
"<a title=\"" + format_date(d) + "\"><span class=\"red\">Scheduled to show " + (days * -1).to_s + " days ago</span></a> "
"<a title=\"" + format_date(d) + "\"><span class=\"red\">#{t('todos.scheduled_overdue', :days => (days * -1).to_s)}</span></a> "
when 0
"<a title=\"" + format_date(d) + "\"><span class=\"amber\">Show Today</span></a> "
"<a title=\"" + format_date(d) + "\"><span class=\"amber\">#{t('todos.show_today')}</span></a> "
when 1
"<a title=\"" + format_date(d) + "\"><span class=\"amber\">Show Tomorrow</span></a> "
"<a title=\"" + format_date(d) + "\"><span class=\"amber\">#{t('todos.show_tomorrow')}</span></a> "
# due 2-7 days away
when 2..7
if prefs.due_style == Preference.due_styles[:due_on]
"<a title=\"" + format_date(d) + "\"><span class=\"orange\">Show on " + d.strftime("%A") + "</span></a> "
"<a title=\"" + format_date(d) + "\"><span class=\"orange\">#{t('todos.show_on_date', :date => d.strftime("%A"))}</span></a> "
else
"<a title=\"" + format_date(d) + "\"><span class=\"orange\">Show in " + days.to_s + " days</span></a> "
"<a title=\"" + format_date(d) + "\"><span class=\"orange\">#{t('todos.show_in_days', :days => days.to_s)}</span></a> "
end
# more than a week away - relax
else
"<a title=\"" + format_date(d) + "\"><span class=\"green\">Show in " + days.to_s + " days</span></a> "
"<a title=\"" + format_date(d) + "\"><span class=\"green\">#{t('todos.show_in_days', :days => days.to_s)}</span></a> "
end
end
@ -300,7 +300,7 @@ module TodosHelper
def image_tag_for_star(todo)
class_str = todo.starred? ? "starred_todo" : "unstarred_todo"
image_tag("blank.png", :title =>"Star action", :class => class_str)
image_tag("blank.png", :title =>t('todos.star_action'), :class => class_str)
end
def auto_complete_result2(entries, phrase = nil)

View file

@ -6,16 +6,6 @@ class Preference < ActiveRecord::Base
{ :due_in_n_days => 0, :due_on => 1}
end
def self.day_number_to_name_map
{ 0 => "Sunday",
1 => "Monday",
2 => "Tuesday",
3 => "Wednesday",
4 => "Thursday",
5 => "Friday",
6 => "Saturday"}
end
def hide_completed_actions?
return show_number_completed == 0
end

View file

@ -36,10 +36,10 @@ class Project < ActiveRecord::Base
named_scope :hidden, :conditions => { :state => 'hidden' }
named_scope :completed, :conditions => { :state => 'completed'}
validates_presence_of :name, :message => "project must have a name"
validates_length_of :name, :maximum => 255, :message => "project name must be less than 256 characters"
validates_uniqueness_of :name, :message => "already exists", :scope =>"user_id"
validates_does_not_contain :name, :string => ',', :message => "cannot contain the comma (',') character"
validates_presence_of :name
validates_length_of :name, :maximum => 255
validates_uniqueness_of :name, :scope =>"user_id"
validates_does_not_contain :name, :string => ','
acts_as_list :scope => 'user_id = #{user_id} AND state = \'#{state}\''
acts_as_state_machine :initial => :active, :column => 'state'
@ -71,8 +71,8 @@ class Project < ActiveRecord::Base
def self.feed_options(user)
{
:title => 'Tracks Projects',
:description => "Lists all the projects for #{user.display_name}"
:title => t('models.project.feed_title'),
:description => t('models.project.feed_description', :username => user.display_name)
}
end

View file

@ -135,7 +135,7 @@ class Todo < ActiveRecord::Base
def validate
if !show_from.blank? && show_from < user.date
errors.add("show_from", "must be a date in the future")
errors.add("show_from", t('models.todo.error_date_must_be_future'))
end
errors.add(:description, "may not contain \" characters") if /\"/.match(description)
unless @predecessor_array.nil? # Only validate predecessors if they changed

View file

@ -13,7 +13,7 @@ class User < ActiveRecord::Base
def update_positions(context_ids)
context_ids.each_with_index do |id, position|
context = self.detect { |c| c.id == id.to_i }
raise "Context id #{id} not associated with user id #{@user.id}." if context.nil?
raise I18n.t('models.user.error_context_not_associated', :context => id, :user => @user.id) if context.nil?
context.update_attribute(:position, position + 1)
end
end
@ -27,7 +27,7 @@ class User < ActiveRecord::Base
def update_positions(project_ids)
project_ids.each_with_index do |id, position|
project = self.detect { |p| p.id == id.to_i }
raise "Project id #{id} not associated with user id #{@user.id}." if project.nil?
raise I18n.t('models.user.error_project_not_associated', :project => id, :user => @user.id) if project.nil?
project.update_attribute(:position, position + 1)
end
end

View file

@ -13,7 +13,7 @@
<div id="c_<%=context.id%>_target" class="context_target drop_target"></div>
<div id="c<%= context.id %>items" class="items toggle_target">
<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 class="message"><p><%= t 'contexts.no_actions' %></p></div>
</div>
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "context" } %>
</div><!-- [end:items] -->

View file

@ -14,11 +14,11 @@
<div class="widgets">
<button type="submit" class="positive" id="<%= dom_id(context, 'submit') %>" tabindex="15">
<%=image_tag("accept.png", :alt => "") %>
Update
<%= t 'common.update' %>
</button>
<a href="" onclick="" class="negative">
<%=image_tag("cancel.png", :alt => "") %>
Cancel
<%= t 'common.cancel' %>
</a>
</div>
</div>

View file

@ -1,7 +1,7 @@
<div class="list-stategroup-contexts-container">
<h2><span id="<%= state %>-contexts-count" class="badge"><%= context_state_group.length %></span><%= state.titlecase %> Contexts</h2>
<h2><span id="<%= state %>-contexts-count" class="badge"><%= context_state_group.length %></span><%= state.titlecase %> <%= t('common.contexts') %></h2>
<div id="<%= state%>-contexts-empty-nd" style="<%= no_contexts ? 'display:block' : 'display:none'%>">
<div class="message"><p>Currently there are no <%= state %> contexts</p></div>
<div class="message"><p><%= t('contexts.no_contexts', :state => state) %></p></div>
</div>
<div id="list-contexts-<%= state %>">
<%= render :partial => 'context_listing', :collection => context_state_group %>

View file

@ -3,4 +3,4 @@ page.delay(0.5) do
page[dom_id(@context, "container")].remove
end
page['badge_count'].replace_html @down_count
page.notify :notice, "Deleted context '#{@context.name}'", 5.0
page.notify :notice, t('contexts.context_deleted', :name=>@context.name), 5.0

View file

@ -1 +1 @@
page.notify :error, @error_message || "An error occurred on the server.", 8.0
page.notify :error, @error_message || t('common.server_error'), 8.0

View file

@ -7,7 +7,7 @@
<div id="context_new_container">
<div id="toggle_context_new" class="hide_form">
<a title="Hide new context form" accesskey="n">&laquo; Hide form</a>
<a title="<%= t('contexts.hide_form_link_title') %>" accesskey="n">&laquo; <%= t('contexts.hide_form') %></a>
</div>
<div id="context_new" class="context_new" style="display:block">
@ -20,16 +20,16 @@
<div id="status"><%= error_messages_for('context') %></div>
<label for="context_name">Context name</label><br />
<label for="context_name"><%= t 'contexts.context_name' %></label><br />
<%= text_field( "context", "name" ) %><br />
<label for="context_hide">Hide from front page?</label>
<label for="context_hide"><%= t 'contexts.context_hide' %></label>
<%= check_box( "context", "hide" ) %><br />
<div class="submit_box">
<div class="widgets">
<button type="submit" class="positive" id="context_new_submit">
<%= image_tag("accept.png", :alt => "") + 'Add Context' %>
<%= image_tag("accept.png", :alt => "") + t('contexts.add_context') %>
</button>
</div>
</div>

View file

@ -1,5 +1,5 @@
<% current_user.contexts.each do |c| -%>
<%= c.name.upcase %>
<%= count_undone_todos_phrase_text(c)%>. Context is <%= c.hidden? ? "Hidden" : "Active" %>.
<%= count_undone_todos_phrase_text(c)%>. <%= c.hidden? ? t('contexts.status_hidden') : t('contexts.status_active') %>.
<% end -%>

View file

@ -1,2 +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><%= t('contexts.visible_contexts') %></h2><%= render :partial => 'mobile_context_listing', :collection => @active_contexts %>
<h2><%= t('contexts.hidden_contexts') %></h2><%= render :partial => 'mobile_context_listing', :collection => @hidden_contexts %>

View file

@ -1,7 +1,7 @@
<div id="display_box">
<%= render :partial => "contexts/context", :locals => { :context => @context, :collapsible => false } %>
<% unless @max_completed==0 -%>
<%= render :partial => "todos/completed", :locals => { :done => @done, :suppress_context => true, :collapsible => false, :append_descriptor => "in this context (last #{prefs.show_number_completed})" } %>
<%= render :partial => "todos/completed", :locals => { :done => @done, :suppress_context => true, :collapsible => false, :append_descriptor => t('contexts.last_completed_in_context', :number=>prefs.show_number_completed) } %>
<% end -%>
</div><!-- [end:display_box] -->

View file

@ -1,4 +1,4 @@
status_message = 'Context saved'
status_message = t('contexts.save_status_message')
page.notify :notice, status_message, 5.0
if @context_state_changed
page.remove dom_id(@context, 'container')

View file

@ -4,5 +4,5 @@ page['todo_context_name'].value = @context.name
# renew context auto complete array
page << "contextAutoCompleter.options.array = #{context_names_for_autocomplete}; contextAutoCompleter.changed = true"
status_message = "Name of context was changed"
status_message = t('contexts.update_status_message')
page.notify :notice, status_message, 5.0

View file

@ -0,0 +1,36 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3>Daten exportieren</h3>
<p>Sie k&ouml;nnen zwischen den folgenden Formaten w&auml;hlen:</p>
<ul>
<li><strong>YAML: </strong>F&uuml;r den Daten-Import bevorzugt.<br/><i>Bitte beachten Sie, dass der YAML-Import zur Zeit noch experimentelle Funktionalit&auml;t darstellt. Nutzen Sie diese Option also nicht. um kritische Daten zu sichern.</i></li>
<li><strong>CSV: </strong>Am besten f&uuml;r den Export in eine Tabellen-Kalkulation oder &auml;hnliche Auswertungs-Software geeignet</li>
<li><strong>XML: </strong>Am besten f&uuml;r den Daten-Import oder automatische Weiterverarbeitung</li>
</ul>
</div>
<br/><br/>
<table class="export_table">
<tr>
<th>Beschreibung</th>
<th>Download link</th>
</tr>
<tr>
<td>YAML-Datei mit all Ihren Aktionen, Umgebungen, Projekten, Tags und Notizen</td>
<td><%= link_to "YAML Datei", :controller => 'data', :action => 'yaml_export' %></td>
</tr>
<tr>
<td>CSV-Datei mit all Ihren Aktionen, benannten Umgebungen und Projekten</td>
<td><%= link_to "CSV Dile (Aktionen, Umgebungen und Projekte)", :controller => 'data', :action => 'csv_actions' %></td>
</tr>
<tr>
<td>CSV-Datei mit all Ihren Notizen</td>
<td><%= link_to "CSV Datei (nur Notizen)", :controller => 'data', :action => 'csv_notes' %></td>
</tr>
<tr>
<td>XML-Datei mit all Ihren Aktionen, Umgebungen, Projekten, Tags und Notizen</td>
<td><%= link_to "XML file (actions only)", :controller => 'data', :action => 'xml_export' %></td>
</tr>
</table>
</div><!-- End of feeds -->
</div>

View file

@ -0,0 +1,17 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<p><b>Vorsicht</b>: vor dem Import der YAML Datei werden alle Daten in Ihrer Datenbank gel&ouml;scht.
Falls Sie entsprechenden Zugriff auf Ihre Datenbank haben, empfiehlt es sich, ein Backup anzulegen,
bevor Sie fortfahren.
</p>
<p>F&uuml;gen Sie den Inhalt der kopierten YAML Datei in das untenstehende Formular ein:</p>
</div>
<p>
<% form_for :import, @import, :url => {:controller => 'data', :action => 'yaml_import'} do |f| %>
<%= f.text_area :yaml %><br />
<input type="submit" value="Daten importieren">
<% end %>
</p>
</div><!-- End of feeds -->
</div><!-- End of display_box -->

View file

@ -1,7 +1,5 @@
<% if !(@errmessage == '') %>
<p>There were these errors:
<pre><%= @errmessage %></pre>
</p>
<p><%= t('data.import_errors') %>:<pre><%= @errmessage %></pre></p>
<% else %>
<p>Import was successful.</p>
<p><%= t('data.import_successful') %></p>
<% end %>

View file

@ -1,80 +1,80 @@
<div id="display_box">
<div id="feeds">
<div id="feedlegend">
<h3>Legend:</h3>
<h3><%= t('feedlist.legend') %></h3>
<dl>
<dt><%= image_tag("feed-icon.png", :size => "16X16", :border => 0)%></dt><dd>RSS Feed</dd>
<dt><span class="feed">TXT</span></dt><dd>Plain Text Feed</dd>
<dt><span class="feed">iCal</span></dt><dd>iCal feed</dd>
<dt><%= image_tag("feed-icon.png", :size => "16X16", :border => 0)%></dt><dd><%= t('feedlist.rss_feed') %></dd>
<dt><span class="feed">TXT</span></dt><dd><%= t('feedlist.plain_text_feed') %></dd>
<dt><span class="feed">iCal</span></dt><dd><%= t('feedlist.ical_feed') %></dd>
</dl>
<p>Note: All feeds show only actions that have not been marked as done.</p>
<p><%= t('feedlist.notice_incomplete_only') %></p>
</div>
<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
<%= t('feedlist.last_fixed_number', :number=>15) %>
</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
<%= t('feedlist.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
<%= t('feedlist.actions_due_today') %>
</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
<%= t('feedlist.actions_due_next_week') %>
</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
<%= t('feedlist.actions_completed_last_week') %>
</li>
<li>
<%= rss_formatted_link({:controller => 'contexts', :action => 'index'}) %>
<%= text_formatted_link({:controller => 'contexts', :action => 'index'}) %>
All Contexts
<%= t('feedlist.all_contexts') %>
</li>
<li>
<%= rss_formatted_link({:controller => 'projects', :action => 'index'}) %>
<%= text_formatted_link({:controller => 'projects', :action => 'index'}) %>
All Projects
<%= t('feedlist.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
<%= t('feedlist.active_projects_wo_next') %>
</li>
<li>
<%= rss_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
<%= text_formatted_link({:controller => 'todos', :action => 'index', :tag => 'starred'}) %>
All starred, active actions
<%= t('feedlist.active_starred_actions') %>
</li>
<li>
<%= text_formatted_link({:controller => 'projects', :action => 'index', :projects_and_actions => true}) %>
Active projects with their actions
<%= t('feedlist.projects_and_actions') %>
</li>
<li><h4>Feeds for incomplete actions in a specific context:</h4>
<li><h4><%= t('feedlist.context_centric_actions') %>:</h4>
<% if @active_contexts.empty? && @hidden_contexts.empty? -%>
<ul><li>There need to be at least one context before you can request a feed</li></ul>
<ul><li><%= t('feedlist.context_needed') %></li></ul>
<% else -%>
<ul>
<li>Step 1 - Choose the context you want a feed of:
<li><%= t('common.numbered_step', :number => 1) %> - <%= t('feedlist.choose_context') %>:
<select name="feed-contexts" id="feed-contexts">
<%= options_from_collection_for_select(@active_contexts, "id", "name", @active_contexts.first.id) unless @active_contexts.empty?-%>
<%= options_from_collection_for_select(@hidden_contexts, "id", "name") -%>
</select>
</li>
<li>Step 2 - Select the feed for this context
<li><%= t('common.numbered_step', :number => 2) %> - <%= t('feedlist.select_feed_for_context') %>
<div id="feedicons-context">
<div id="feeds-for-context">
<%= render :partial => 'feed_for_context', :locals => { :context => @active_contexts.empty? ? @hidden_contexts.first : @active_contexts.first } %>
@ -84,19 +84,19 @@
</ul>
<% end -%>
</li>
<li><h4>Feeds for incomplete actions in a specific project:</h4>
<li><h4><%= t('feedlist.project_centric') %>:</h4>
<% if @active_projects.empty? && @hidden_projects.empty? -%>
<ul><li>There need to be at least one project before you can request a feed</li></ul>
<ul><li><%= t('feedlist.project_needed') %></li></ul>
<% else -%>
<ul>
<li>Step 1 - Choose the project you want a feed of:
<li><%= t('common.numbered_step', :number => 1) %> - <%= t('feedlist.choose_project') %>:
<select name="feed-projects" id="feed-projects">
<%= options_from_collection_for_select(@active_projects, "id", "name", @active_projects.first.id) unless @active_projects.empty?-%>
<%= options_from_collection_for_select(@hidden_projects, "id", "name") -%>
<%= options_from_collection_for_select(@completed_projects, "id", "name") -%>
</select>
</li>
<li>Step 2 - Select the feed for this project
<li><%= t('common.numbered_step', :number => 2) %> - <%= t('feedlist.select_feed_for_project') %>
<div id="feedicons-project">
<div id="feeds-for-project">
<%= render :partial => 'feed_for_project', :locals => { :project => @active_projects.empty? ? @hidden_projects.first : @active_projects.first } %>

View file

@ -7,7 +7,7 @@ set myToken to "<%= current_user.token %>"
set myContextID to <%= context.id %> (* <%= context.name %> *)
-- Display dialog to enter your description
display dialog "Description of next action:" default answer ""
display dialog "<%= t('integrations.applescript_next_action_prompt') %>" default answer ""
set myDesc to text returned of the result
-- Now send all that info to Tracks
@ -17,4 +17,4 @@ tell application "<%= home_url %>backend/api"
end tell
-- Show the ID of the newly created next action
display dialog "New next action with id " & returnValue & " created"
display dialog "<%= t('integrations.applescript_success_before_id') %> " & returnValue & " <%= t('integrations.applescript_success_after_id') %>"

View file

@ -1,5 +1,5 @@
<Module>
<ModulePrefs title="Tracks" directory_title="Tracks" description="Gadget to add Tracks to Gmail as a gadget" author="Tracks" author_email="butshesagirl@rousette.org.uk" author_affiliation="Tracks" author_location="UK" title_url="http://www.getontracks.org/" screenshot="http://www.getontracks.org/images/uploads/tracks_home_thumb.png" thumbnail="http://www.getontracks.org/images/uploads/tracks_tickler.png" category="communication" category2="tools" height="300">
<ModulePrefs title="Tracks" directory_title="Tracks" description="<%= t('integrations.gmail_description') %>" author="Tracks" author_email="butshesagirl@rousette.org.uk" author_affiliation="Tracks" author_location="UK" title_url="http://www.getontracks.org/" screenshot="http://www.getontracks.org/images/uploads/tracks_home_thumb.png" thumbnail="http://www.getontracks.org/images/uploads/tracks_tickler.png" category="communication" category2="tools" height="300">
</ModulePrefs>
<Content type="url" href="<%= home_url %>mobile"/>
</Module>

View file

@ -0,0 +1,130 @@
<% has_contexts = !current_user.contexts.empty? -%>
<h1>Integration</h1>
<p>Tracks kann mit verschiedenen Werkzeugen zusammenarbeiten...
was immer Sie brauchen, um Ihre Aufgaben zu erledigen!
Auf dieser Seite finden Sie Informationen, um einige dieser Werkzeuge einzurichten.
Diese Beispiele sind nicht unbedingt auf Ihre Umgebung anwendbar oder bed&uuml;rfen mehr
technisches Wissen als andere.
Weitere Informationen finden Sie in der <%= link_to "Entwickler Documentation der Tracks' REST API", url_for(:action => 'rest_api') %> (englisch).</p>
<br/><p>Inhalt:</p>
<ul>
<li><a href="#applescript1-section">Eine Aktion mit Applescript hinzuf&uuml;gen</a></li>
<li><a href="#applescript2-section">Eine Aktion anhand der aktuell in Mail.app selektierten Nachricht erstellen</a></li>
<li><a href="#quicksilver-applescript-section">Aktionen mit Quicksilver und Applescript erstellen</a></li>
<li><a href="#email-cron-section">Anstehende Aufgaben automatisch sich via E-Mail zusenden lassen</a></li>
<li><a href="#message_gateway">Tracks mit einem Mail-Server integrieren, um Aufgaben via E-Mail zu erstellen</a></li>
<li><a href="#google_gadget">Tracks zu Ihrer Google Gmail Seite hinzuf&uuml;gen</a></li>
</ul><br/>
<p>Sie haben weitere Beispiele?
<a href="http://www.getontracks.org/forums/viewforum/10/" title="Tracks | Tips and Tricks">Berichten Sie uns
in unserem Tipps&amp;Tricks Forum</a>, damit wir es f&uuml;r die n&auml;chsten Versionen ber&uuml;cksichtigen k&ouml;nnen.
</p>
<a name="applescript1-section"> </a>
<h2>Eine Aktion mit Applescript hinzuf&uuml;gen</h2>
<p>Dieses Beispiel-Script zeigt einen Dialog, welcher nach einer Beschreibung fragt und die Aufgabe in einem festen Kontext anlegt.</p>
<% if has_contexts -%>
<ol>
<li>W&auml;hlen Sie den Kontext, f&uuml;r welchen die Aktion erstellt werden soll: <select name="applescript1-contexts" id="applescript1-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
</li>
<li>Kopieren Sie das AppleScript in die Zwischenablage.<br />
<textarea id="applescript1" name="applescript1" rows="15"><%= render :partial => 'applescript1', :locals => { :context => current_user.contexts.first } %></textarea>
</li>
<li>&Ouml;ffnen Sie den Script Editor und f&uuml;gen die Daten in ein neues Script ein.</li>
<li>Kompilieren und speichern Sie das Script, um es bei Bedarf einzusetzen.</li>
</ol>
<% else %>
<br/><p id="no_context_msg"><i>Sie haben noch keinen Kontext angelegt. Dieses Script ist automatisch verf&uuml;gbar, sobald Sie Ihren ersten Kontext angelegt haben.</i></p>
<% end %>
<a name="applescript2-section"> </a>
<h2>Add an Action with Applescript based on the currently selected Email in Mail.app</h2>
<p>This script takes the sender and subject of the selected email(s) in Mail and creates a new action for each one, with the description, "Email [sender] about [subject]". The description gets truncated to 100 characters (the validation limit for the field) if it is longer than that. It also has Growl notifications if you have Growl installed.</p>
<% if has_contexts -%>
<ol>
<li>Choose the context you want to add actions to: <select name="applescript2-contexts" id="applescript2-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
</li>
<li>Copy the Applescript below to the clipboard.<br />
<textarea id="applescript2" name="applescript2" rows="15"><%= render :partial => 'applescript2', :locals => { :context => current_user.contexts.first } %></textarea>
</li>
<li>Open Script Editor and paste the script into a new document.</li>
<li>Compile and save the script to the ~/Library/Scriipts/Mail Scripts directory.</li>
<li>For more information on using AppleScript with Mail.app, see <a href="http://www.apple.com/applescript/mail/" title="Scriptable Applications: Mail">this overview</a>.
</ol>
<% else %>
<br/><p><i>You do not have any context yet. The script will be available after you add your first context</i></p>
<% end %>
<a name="quicksilver-applescript-section"></a>
<h2>Add Actions with Quicksilver and Applescript</h2>
<p>This integration will allow you to add actions to Tracks via <a href="http://quicksilver.blacktree.com/">Quicksilver</a>.</p>
<% if has_contexts -%>
<ol>
<li>Choose the context you want to add actions to: <select name="quicksilver-contexts" id="quicksilver-contexts"><%= options_from_collection_for_select(current_user.contexts, "id", "name", current_user.contexts.first.id) %></select>
</li>
<li>Copy the Applescript below to the clipboard.<br />
<textarea id="quicksilver" name="quicksilver" rows="15"><%= render :partial => 'quicksilver_applescript', :locals => { :context => current_user.contexts.first } %></textarea>
</li>
<li>Open Script Editor and paste the script into a new document.</li>
<li>Compile and save the script as "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ (you may need to create the Actions directory)</li>
<li>Restart Quicksilver</li>
<li>Activate Quicksilver (Ctrl+Space by default)</li>
<li>Press "." to put quicksilver into text mode</li>
<li>Type the description of the next action you want to add</li>
<li>Press tab to switch to the action pane.</li>
<li>By typing or scrolling, choose the "Add to Tracks" action.</li>
</ol>
<% else %>
<br/><p><i>You do not have any context yet. The script will be available after you add your first context</i></p>
<% end %>
<a name="email-cron-section"> </a>
<h2>Automatically Email Yourself Upcoming Actions</h2>
<p>If you enter the following entry to your crontab, you will receive email every day around 5 AM with a list of the upcoming actions which are due within the next 7 days.</p>
<textarea id="cron" name="cron">0 5 * * * /usr/bin/curl -0 "<%= home_url %>todos.txt?due=6&token=<%= current_user.token %>" | /usr/bin/mail -e -s 'Tracks actions due in the next 7 days' youremail@yourdomain.com</textarea>
<p>You can of course use other text <%= link_to 'feeds provided by Tracks', feeds_path %> -- why not email a list of next actions in a particular project to a group of colleagues who are working on the project?</p>
<a name="message_gateway"> </a>
<h2>Integrated email/SMS receiver</h2>
<p>
If Tracks is running on the same server as your mail server, you can use the integrated mail handler built into tracks. Steps to set it up:
<ul>
<li>Go to <%= link_to "Preferences", preferences_url %> and set your "From email" and "default email context" for todos sent in via email (which could come from an SMS message)</li>
<li>In sendmail/qmail/postfix/whatever, set up an email address alias to pipe messages to <pre >/PATH/TO/RUBY/ruby /PATH/TO/TRACKS/script/runner -e production 'MessageGateway.receive(STDIN.read)'</pre></li>
<li>Send an email to your newly configured address!</li>
</ul>
<p>You can also use the Rich Todo API to send in tasks like "do laundry @ Home"
or "Call Bill > project X". The subject of the message will fill description,
context, and project, while the body will populate the tasks's note.
</p>
<a name="google_gadget"> </a>
<h2>Add Tracks as a Google Gmail gadget</h2>
<p>
You can now manage your projects/actions inside Gmail using Tracks Gmail Gadget.
Add Tracks Gmail gadget to the sidebar of Gmail and track your next actions
or add new action without explicitly open new browser tab for Tracks. Steps to set it up:
</p>
<ul>
<li>Sign in to Gmail and click Settings in the top right of your Gmail page. In Gmail setting page, click Labs tab</li>
<li>Enable the "Add any gadget by URL" feature. You will find it at bottom of the list. Select Enable radio button and click Save Changes button.</li>
<li>Now you can see Gadgets tab added to Gmail Settings. Go to the Gadgets tab</li>
<li>Paste following link to the Add a gadget by its URL: and then click Add button:<br/>
<pre><%= integrations_url + "/google_gadget" %></pre></li>
</ul>
<Module>
<ModulePrefs title="GTDify" directory_title="GTDify" description="Official gadget for GTDify service." author="GTDify" author_email="support@gtdify.com" author_affiliation="GTDify" author_location="NJ, USA" title_url="http://www.gtdify.com/" screenshot="http://www.gtdify.com/modules/gmail/ss.png" thumbnail="http://www.gtdify.com/modules/gmail/tn.png" category="communication" category2="tools" height="300">
</ModulePrefs>
<Content type="url" href="http://my.gtdify.com/mobile/"/>
</Module>

View file

@ -3,7 +3,7 @@ xml.instruct!
xml.OpenSearchDescription 'xmlns' => "http://a9.com/-/spec/opensearch/1.1/" do
xml.ShortName Tracks
xml.Description 'Search in Tracks'
xml.Description t('integrations.opensearch_description')
xml.InputEncoding 'UTF-8'
xml.Image("data:image/x-icon;base64," + @icon_data,
'width' => '16', 'height' => '16')

View file

@ -16,25 +16,25 @@
<h1><span class="count"><%= @down_count %></span> <%=
current_user.time.strftime(@prefs.title_date_format) -%></h1>
<div class="nav">
<%= (link_to("0-New action", new_todo_path(new_todo_params))+" | ") unless @new_mobile -%>
<%= (link_to("1-Home", todos_path(:format => 'm'))+" | ") unless @home -%>
<%= (link_to("2-Contexts", contexts_path(:format => 'm'))+" | ") -%>
<%= (link_to("3-Projects", projects_path(:format => 'm'))+" | ") -%>
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
<%= (link_to(t('layouts.mobile_navigation.new_action'), new_todo_path(new_todo_params))+" | ") unless @new_mobile -%>
<%= (link_to(t('layouts.mobile_navigation.home'), todos_path(:format => 'm'))+" | ") unless @home -%>
<%= (link_to(t('layouts.mobile_navigation.contexts'), contexts_path(:format => 'm'))+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.projects'), projects_path(:format => 'm'))+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.starred'), {:action => "tag", :controller => "todos", :id => "starred.m"})) -%>
<% end
end -%><%= render_flash -%>
</div>
<%= yield -%>
<hr/><% if !@prefs.nil? -%>
<div class="nav">
<%= (link_to("Logout", logout_path(:format => 'm')) +" | ") -%>
<%= (link_to("0-New action", new_todo_path(new_todo_params), {:accesskey => "0"})+" | ") unless @new_mobile -%>
<%= (link_to("1-Home", todos_path(:format => 'm'), {:accesskey => "1"})+" | ") unless @home -%>
<%= (link_to("2-Contexts", contexts_path(:format => 'm'), {:accesskey => "2"})+" | ") -%>
<%= (link_to("3-Projects", projects_path(:format => 'm'), {:accesskey => "3"})+" | ") -%>
<%= (link_to("4-Starred", {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
<%= (link_to("Tickler", {:action => "index", :controller => "tickler.m"})+" | ") -%>
<%= (link_to("Feeds", {:action => "index", :controller => "feeds.m"})) -%>
<%= (link_to(t('layouts.mobile_navigation.logout'), logout_path(:format => 'm')) +" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.new_action'), new_todo_path(new_todo_params), {:accesskey => "0"})+" | ") unless @new_mobile -%>
<%= (link_to(t('layouts.mobile_navigation.home'), todos_path(:format => 'm'), {:accesskey => "1"})+" | ") unless @home -%>
<%= (link_to(t('layouts.mobile_navigation.contexts'), contexts_path(:format => 'm'), {:accesskey => "2"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.projects'), projects_path(:format => 'm'), {:accesskey => "3"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.starred'), {:action => "tag", :controller => "todos", :id => "starred.m"}, {:accesskey => "4"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.tickler'), {:action => "index", :controller => "tickler.m"})+" | ") -%>
<%= (link_to(t('layouts.mobile_navigation.feeds'), {:action => "index", :controller => "feeds.m"})) -%>
</div>
<% end -%>
<%= render :partial => "shared/mobile_footer" -%>

View file

@ -24,7 +24,7 @@
<% end -%>
</script>
<link rel="shortcut icon" href="<%= url_for(:controller => 'favicon.ico') %>" />
<%= auto_discovery_link_tag(:rss, {:controller => "todos", :action => "index", :format => 'rss', :token => "#{current_user.token}"}, {:title => "RSS feed of next actions"}) %>
<%= 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 %>" />
<title><%= @page_title %></title>
</head>
@ -40,47 +40,47 @@
</h1>
</div>
<div id="minilinks">
<%= link_to("Toggle notes", "#", {:accesskey => "S", :title => "Toggle all notes", :id => "toggle-notes-nav"}) %>
<%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
&nbsp;|&nbsp;
<%= link_to "Logout (#{current_user.display_name}) »", logout_path %>
<%= link_to( t('common.logout') + " (#{current_user.display_name}) »", logout_path) %>
</div>
<div id="navcontainer">
<ul class="sf-menu">
<li><%= navigation_link("Home", home_path, {:accesskey => "t", :title => "Home"} ) %></li>
<li><%= navigation_link("Starred", tag_path("starred"), :title => "See your starred actions" ) %></li>
<li><%= navigation_link("Projects", projects_path, {:accesskey=>"p", :title=>"Projects"} ) %></li>
<li><%= navigation_link("Tickler", tickler_path, {:accesskey =>"k", :title => "Tickler"} ) %></li>
<li><a href="#">Organize</a>
<li><%= navigation_link(t('layouts.navigation.home'), home_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('layouts.navigation.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( "Contexts", contexts_path, {:accesskey=>"c", :title=>"Contexts"} ) %></li>
<li><%= navigation_link( "Notes", notes_path, {:accesskey => "o", :title => "Show all notes"} ) %></li>
<li><%= navigation_link( "Repeating todos", {:controller => "recurring_todos", :action => "index"}, :title => "Manage recurring actions" ) %></li>
<li><%= navigation_link( t('layouts.navigation.contexts'), contexts_path, {:accesskey=>"c", :title=>t('layouts.navigation.contexts_title')} ) %></li>
<li><%= navigation_link( t('layouts.navigation.notes'), notes_path, {:accesskey => "o", :title => t('layouts.navigation.notes_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="#">View</a>
<li><a href="#"><%= t('layouts.navigation.view') %></a>
<ul>
<li><%= navigation_link( "Calendar", calendar_path, :title => "Calendar of due actions" ) %></li>
<li><%= navigation_link( "Done", done_path, {:accesskey=>"d", :title=>"Completed"} ) %></li>
<li><%= navigation_link( "Feeds", {:controller => "feedlist", :action => "index"}, :title => "See a list of available feeds" ) %></li>
<li><%= navigation_link( "Statistics", {:controller => "stats", :action => "index"}, :title => "See your statistics" ) %></li>
<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_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
<li><%= navigation_link( t('layouts.navigation.feeds'), {:controller => "feedlist", :action => "index"}, :title => t('layouts.navigation.feeds_title')) %></li>
<li><%= navigation_link( t('layouts.navigation.stats'), {:controller => "stats", :action => "index"}, :title => t('layouts.navigation.stats_title')) %></li>
</ul>
</li>
<li><a href="#">Admin</a>
<ul>
<li><%= navigation_link( "Preferences", preferences_path, {:accesskey => "u", :title => "Show my preferences"} ) %></li>
<li><%= navigation_link( "Export", {:controller => "data", :action => "index"}, {:accesskey => "i", :title => "Import and export data"} ) %></li>
<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'), {:controller => "data", :action => "index"}, {:accesskey => "i", :title => t('layouts.navigation.export_title')} ) %></li>
<% if current_user.is_admin? -%>
<li><%= navigation_link("Manage users", users_path, {:accesskey => "a", :title => "Add or delete users"} ) %></li>
<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="#">?</a>
<ul>
<li><%= link_to 'Integrate Tracks', integrations_path %></li>
<li><%= link_to 'REST API Docs', rest_api_docs_path %></li>
<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), {:controller => "search", :action => "index"}, :title => "Search All Items" ) %></li>
<li><%= navigation_link(image_tag("system-search.png", :size => "16X16", :border => 0), {:controller => "search", :action => "index"}, :title => t('layouts.navigation.search')) %></li>
</ul>
</div>
<%= render_flash %>

View file

@ -1,3 +1,3 @@
unless @msg == ""
page.replace_html "info", content_tag("div", @msg + link_to("log in again.", :controller => "login", :action => "login"), "class" => "warning")
page.replace_html "info", content_tag("div", t(@msg, :link => link_to(t('login.log_in_again'), :controller => "login", :action => "login"), "class" => "warning"))
end

View file

@ -4,30 +4,30 @@
show_cas_form = auth_schemes.include?('cas')
-%>
<div title="Account login" id="loginform" class="form">
<div title="<%= t('login.account_login') %>" id="loginform" class="form">
<%= render_flash %>
<h3>Please log in to use Tracks:</h3>
<h3><%= t('login.please_login') %>:</h3>
<% if show_database_form %>
<div id="database_auth_form" style="display:<%=(@prefered_auth.eql?('database')) ? "block" : "none"%>">
<% form_tag :action=> 'login' do %>
<table>
<tr>
<td><label for="user_login">Login:</label></td>
<td><label for="user_login"><%= User.human_attribute_name('login') %>:</label></td>
<td><input type="text" name="user_login" id="user_login" value="" class="login_text" /></td>
</tr>
<tr>
<td><label for="user_password">Password:</label></td>
<td><label for="user_password"><%= User.human_attribute_name('password') %>:</label></td>
<td><input type="password" name="user_password" id="user_password" class="login_text" /></td>
</tr>
<tr>
<td><label for="user_noexpiry">Stay logged in:</label></td>
<td><label for="user_noexpiry"><%= t('login.user_no_expiry') %>:</label></td>
<td><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="login" value="Sign In &#187;" class="primary" /></td>
<td><input type="submit" name="login" value="<%= t('login.sign_in') %> &#187;" class="primary" /></td>
</tr>
</table>
<% end %>
@ -39,16 +39,16 @@
<% form_tag :action=> 'login' do %>
<table>
<tr>
<td><label for="openid_url">Identity URL:</label></td>
<td><label for="openid_url"><%= User.human_attribute_name('open_id_url') %>:</label></td>
<td><input type="text" name="openid_url" id="openid_url" value="<%= @openid_url %>" class="login_text open_id" /></td>
</tr>
<tr>
<td><label for="user_noexpiry">Stay logged in:</label></td>
<td><label for="user_noexpiry"><%= t('login.user_no_expiry') %>:</label></td>
<td><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="login" value="Sign In &#187;" class="primary" /></td>
<td><input type="submit" name="login" value="<%= t('login.sign_in') %> &#187;" class="primary" /></td>
</tr>
</table>
<% end %>
@ -61,15 +61,15 @@
<tr>
<td>
<% if @username && @user%>
<p>Hello, <%= @username %>! You are authenticated.</p>
<p><%= t('login.cas_logged_in_greeting', :username => @username) %></p>
<% elsif @username %>
<p>Hello, <%= @username %>! You do not have an account on Tracks.
<p><%= t('login.cas_no_user_found', :username => @username) %>
<%if SITE_CONFIG['open_signups']%>
If you like to request on please go here to <%= link_to "Request Account" , signup_url %>
<%= t('login.cas_create_account', :signup_link => link_to(t('login.cas_signup_link'), signup_url)) %>
<%end%>
</p>
<% else %>
<p><%= link_to("CAS Login", login_cas_url) %> </p>
<p><%= link_to(t('login.cas_login'), login_cas_url) %> </p>
<% end %>
</td>
</tr>
@ -78,9 +78,9 @@
<% end %>
</div>
<% if show_openid_form %><p id="alternate_auth_openid" class="alternate_auth">or, <a href="#" onclick="Login.showOpenid();return false;">login with an OpenId</a></p><% end %>
<% if show_database_form %><p id="alternate_auth_database" class="alternate_auth">or, <a href="#" onclick="Login.showDatabase();return false;">go back to the standard login</a></p><% end %>
<% if show_cas_form %><p id="alternate_auth_cas" class="alternate_auth">or, <a href="#" onclick="Login.showCAS();return false;">go to the CAS</a></p><% end %>
<% if show_openid_form %><p id="alternate_auth_openid" class="alternate_auth"><%= t('login.option_separator') %> <a href="#" onclick="Login.showOpenid();return false;"><%= t('login.login_with_openid') %></a></p><% end %>
<% if show_database_form %><p id="alternate_auth_database" class="alternate_auth"><%= t('login.option_separator') %> <a href="#" onclick="Login.showDatabase();return false;"><%= t('login.login_standard') %></a></p><% end %>
<% if show_cas_form %><p id="alternate_auth_cas" class="alternate_auth"><%= t('login.option_separator') %> <a href="#" onclick="Login.showCAS();return false;"><%= t('login.login_cas')%></a></p><% end %>
<script type="text/javascript">
function showPreferredAuth() {

View file

@ -3,31 +3,31 @@
show_openid_form = auth_schemes.include?('open_id')
-%>
<div title="Account login" id="loginform" class="form">
<div title="<%= t('login.account_login') %>" id="loginform" class="form">
<%= render_flash %>
<h3>Please log in to use Tracks:</h3>
<h3><%= t('login.please_login') %>:</h3>
<% if show_database_form %>
<div id="database_auth_form">
<% form_tag login_path(:format => 'm') do %>
<table>
<tr>
<td><label for="user_login">Login:</label></td>
<td><label for="user_login"><%= User.human_attribute_name('login') %>:</label></td>
<td><input type="text" name="user_login" id="user_login" value="" class="login_text" /></td>
</tr>
<tr>
<td><label for="user_password">Password:</label></td>
<td><label for="user_password"><%= User.human_attribute_name('password') %>:</label></td>
<td><input type="password" name="user_password" id="user_password" class="login_text" /></td>
</tr>
<tr>
<td><label for="user_noexpiry">Stay logged in:</label></td>
<td><label for="user_noexpiry"><%= t('login.user_no_expiry') %>:</label></td>
<td><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked="checked" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="login" value="Sign In &#187;" class="primary" /></td>
<td><input type="submit" name="login" value="<%= t('login.sign_in') %> &#187;" class="primary" /></td>
</tr>
</table>
<% end %>
@ -36,22 +36,22 @@
<% if show_openid_form %>
<h4>...or login with an Open ID:</h4>
<h4><%= t('login.mobile_use_openid') %>:</h4>
<div id="openid_auth_form">
<% form_tag login_path(:format => 'm') do %>
<table>
<tr>
<td width="100px"><label for="openid_url">Identity URL:</label></td>
<td width="100px"><label for="openid_url"><%= User.human_attribute_name('open_id_url') %>:</label></td>
<td width="100px"><input type="text" name="openid_url" id="openid_url" value="<%= @openid_url %>" class="login_text open_id" /></td>
</tr>
<tr>
<td width="100px"><label for="user_noexpiry">Stay logged in:</label></td>
<td width="100px"><label for="user_noexpiry"><%= t('login.user_no_expiry') %>:</label></td>
<td width="100px"><input type="checkbox" name="user_noexpiry" id="user_noexpiry" checked /></td>
</tr>
<tr>
<td width="100px"></td>
<td><input type="submit" name="login" value="Sign In &#187;" class="primary" /></td>
<td><input type="submit" name="login" value="<%= t('login.sign_in') %> &#187;" class="primary" /></td>
</tr>
</table>
<% end %>

View file

@ -4,10 +4,10 @@
</div>
<div class="mobile_note_info">
<br/>
<%= link_to("In: " + note.project.name, project_path(note.project, :format => 'm')) %>
Created: <%= format_date(note.created_at) %>
<%= link_to(t('notes.note_location_link') + note.project.name, project_path(note.project, :format => 'm')) %>
<%= Note.human_attribute_name('created_at') %>: <%= format_date(note.created_at) %>
<% if note.updated_at? -%>
&nbsp;|&nbsp;Modified: <%= format_date(note.updated_at) %>
&nbsp;|&nbsp;<%= Note.human_attribute_name('updated_at') %>: <%= format_date(note.updated_at) %>
<% end -%>
</div>
<% note = nil -%>

View file

@ -2,5 +2,5 @@
<%= hidden_field( "note", "project_id" ) %>
<%= text_area( "note", "body", "cols" => 70, "rows" => 15, "tabindex" => 1 ) %>
<br /><br />
<input type="submit" value="Update" tabindex="2" />
<input type="submit" value="<%= t('common.update') %>" tabindex="2" />
<% @note = nil %>

View file

@ -1,23 +1,23 @@
<% 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(t('notes.note_header', :id => note.id.to_s), note_path(note), :title => t('notes.note_link_title', :id => note.id.to_s)) %></h2>
<div class="project_notes" id="<%= dom_id(note) %>">
<%= format_note(note.body) %>
<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),
image_tag("blank.png", :title =>t('notes.delete_note_title'), :class=>"delete_item", :id => "delete_note_"+note.id.to_s),
:url => note_path(note),
:html => {:class => 'delete_note', :title => "delete note"},
:method => :delete,
:confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?",
:confirm => t('notes.delete_confirmation', :id => note.id.to_s),
:before => visual_effect(:fade, dom_id(note, 'container'))) -%>&nbsp;
<%= link_to_function(image_tag( "blank.png", :title => "Edit item", :class=>"edit_item"),
<%= link_to_function(image_tag( "blank.png", :title => t('notes.edit_item_title'), :class=>"edit_item"),
"$('##{dom_id(note)}').toggle(); $('##{dom_id(note, 'edit')}').show(); $('##{dom_id(note, 'edit_form')} textarea').focus();" ) + " | " %>
<%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %>&nbsp;|&nbsp;
Created: <%= format_date(note.created_at) %>
<%= Note.human_attribute_name('created_at') %>: <%= format_date(note.created_at) %>
<% if note.updated_at? -%>
&nbsp;|&nbsp;Modified: <%= format_date(note.updated_at) %>
&nbsp;|&nbsp;<%= Note.human_attribute_name('updated_at') %>: <%= format_date(note.updated_at) %>
<% end -%>
</div>
</div>

View file

@ -1,6 +1,6 @@
<% note = notes_summary -%>
<div class="note_wrapper" id="<%= dom_id(note) %>">
<%= link_to( image_tag("blank.png", :border => 0), note_path(note), :title => "Show note", :class => "link_to_notes icon") %>&nbsp;
<%= link_to( image_tag("blank.png", :border => 0), note_path(note), :title => t('notes.show_note_title'), :class => "link_to_notes icon") %>&nbsp;
<%= rendered_note(note) %>
</div>
<% note = nil -%>

View file

@ -1,3 +1,3 @@
page.notify :notice, "Deleted note '#{@note.id}'", 5.0
page.notify :notice, t('notes.deleted_note', :id => @note.id), 5.0
page['badge_count'].replace_html @count
page.hide "busy"

View file

@ -1,6 +1,6 @@
<div id="display_box_projects">
<% if @all_notes.empty? -%>
<div class="message"><p>Currently there are no notes: add notes to projects from individual project pages.</p></div>
<div class="message"><p><%= t('notes.no_notes_available') %></p></div>
<% else -%>
<% for notes in @all_notes -%>
<div class="container" id="note-<%= notes.id %>-wrapper">

View file

@ -0,0 +1,22 @@
<h2>Help on preferences</h2>
<ul>
<li><strong>first name and last name:</strong> Used for display purposes if set</li>
<li><strong>date format:</strong> the format in which you'd like dates to be shown. For example, for the date 31st January 2006, %d/%m/%Y will show 31/01/2006, %b-%e-%y will show Jan-31-06. See the <a href="http://uk2.php.net/strftime" title="PHP strftime manual">strftime manual</a> for more formatting options for the date.</li>
<li><strong>title date format:</strong> same as above, but for the big date at the top of each page.</li>
<li><strong>time zone:</strong> your local time zone</li>
<li><strong>week starts:</strong> day of the week shown as the start of the week on the popup calendar.</li>
<li><strong>due style:</strong> style in which due dates are shown, e.g. "Due in 3 days", "Due on Wednesday"</li>
<li><strong>show completed projects in sidebar:</strong> whether or not projects marked as complete are shown in the sidebar on the home page and elsewhere</li>
<li><strong>show hidden contexts in sidebar:</strong> whether or not contexts marked as hidden are shown in the sidebar on the home page and elsewhere</li>
<li><strong>show project on todo done:</strong> whether or not to redirect to the project page when an action associated with a project is marked complete</li>
<% if current_user.is_admin? %>
<li><strong>admin email:</strong> email address for the admin user of Tracks (displayed on the signup page for users to contact to obtain an account)</li>
<% end %>
<li><strong>staleness starts:</strong> the number of days before items with no due date get marked as stale (with a yellow highlight)</li>
<li><strong>show number completed:</strong> number of completed actions to show on the page. If you set this to zero, the completed actions box will not be shown on the home page or on the individual context or project pages. You can still see all your completed items by clicking the 'Done' link in the navigation bar at the top of each page.</li>
<li><strong>refresh:</strong> automatic refresh interval for each of the pages (in minutes)</li>
<li><strong>verbose action descriptor:</strong> when true, show project/context name in action listing; when false show [P]/[C] with tool tips</li>
<li><strong>mobile todos per page:</strong> the maximum number of actions to show on a single page in the mobile view</li>
<li><strong>From email:</strong> the email address you use for sending todos as email or SMS messages to your Tracks account</li>
<li><strong>Default email context:</strong> the context to which tasks sent in via email or SMS should be added</li>
</ul>

View file

@ -1,37 +1,16 @@
<div id="display_box" class="container context">
<h2>Help on preferences</h2>
<ul>
<li><strong>first name and last name:</strong> Used for display purposes if set</li>
<li><strong>date format:</strong> the format in which you'd like dates to be shown. For example, for the date 31st January 2006, %d/%m/%Y will show 31/01/2006, %b-%e-%y will show Jan-31-06. See the <a href="http://uk2.php.net/strftime" title="PHP strftime manual">strftime manual</a> for more formatting options for the date.</li>
<li><strong>title date format:</strong> same as above, but for the big date at the top of each page.</li>
<li><strong>time zone:</strong> your local time zone</li>
<li><strong>week starts:</strong> day of the week shown as the start of the week on the popup calendar.</li>
<li><strong>due style:</strong> style in which due dates are shown, e.g. "Due in 3 days", "Due on Wednesday"</li>
<li><strong>show completed projects in sidebar:</strong> whether or not projects marked as complete are shown in the sidebar on the home page and elsewhere</li>
<li><strong>show hidden contexts in sidebar:</strong> whether or not contexts marked as hidden are shown in the sidebar on the home page and elsewhere</li>
<li><strong>show project on todo done:</strong> whether or not to redirect to the project page when an action associated with a project is marked complete</li>
<% if current_user.is_admin? %>
<li><strong>admin email:</strong> email address for the admin user of Tracks (displayed on the signup page for users to contact to obtain an account)</li>
<% end %>
<li><strong>staleness starts:</strong> the number of days before items with no due date get marked as stale (with a yellow highlight)</li>
<li><strong>show number completed:</strong> number of completed actions to show on the page. If you set this to zero, the completed actions box will not be shown on the home page or on the individual context or project pages. You can still see all your completed items by clicking the 'Done' link in the navigation bar at the top of each page.</li>
<li><strong>refresh:</strong> automatic refresh interval for each of the pages (in minutes)</li>
<li><strong>verbose action descriptor:</strong> when true, show project/context name in action listing; when false show [P]/[C] with tool tips</li>
<li><strong>mobile todos per page:</strong> the maximum number of actions to show on a single page in the mobile view</li>
<li><strong>From email:</string> the email address you use for sending todos as email or SMS messages to your Tracks account</li>
<li><string>Default email context:</string> the context to which tasks sent in via email or SMS should be added</li>
</ul>
<%= render :partial => 'help' %>
</div>
<div id="input_box" class="container context">
<% form_tag :action => 'update' do %>
<table>
<tr>
<td><label>first name:</label></td>
<td><label><%= Preference.human_attribute_name('first_name') %></label></td>
<td><%= text_field 'user', 'first_name' %></td>
</tr>
<tr>
<td><label>last name:</label></td>
<td><label><%= Preference.human_attribute_name('last_name') %></label></td>
<td><%= text_field 'user', 'last_name' %></td>
</tr>
<%
@ -55,8 +34,8 @@
<%= row_with_text_field('title_date_format') %>
<%= table_row('time_zone', false) { time_zone_select('prefs','time_zone') } %>
<%= row_with_select_field("week_starts", Preference.day_number_to_name_map.invert.sort{|a,b| a[1]<=>b[1]})%>
<%= row_with_select_field("due_style", [['Due in ___ days',Preference.due_styles[:due_in_n_days]],['Due on _______',Preference.due_styles[:due_on]]]) %>
<%= row_with_select_field("week_starts", (0..6).to_a.map {|num| [t('date.day_names')[num], num] }) %>
<%= row_with_select_field("due_style", [[t('models.preference.due_styles')[0],Preference.due_styles[:due_in_n_days]],[t('models.preference.due_styles')[1],Preference.due_styles[:due_on]]]) %>
<%= row_with_select_field("show_completed_projects_in_sidebar") %>
<%= row_with_select_field("show_hidden_projects_in_sidebar") %>
<%= row_with_select_field("show_hidden_contexts_in_sidebar") %>
@ -71,8 +50,8 @@
<%= row_with_text_field("sms_email") %>
<%= table_row("sms_context", false) { select('prefs', 'sms_context_id', current_user.contexts.map{|c| [c.name, c.id]}) } %>
<tr><td><%= submit_tag "Update" %></td>
<td><%= link_to "Cancel", :action => 'index' %></td>
<tr><td><%= submit_tag t('common.update') %></td>
<td><%= link_to t('common.cancel'), :action => 'index' %></td>
</tr>
</table>
<% end %>

View file

@ -1,66 +1,66 @@
<div id="single_box" class="container context prefscontainer">
<h2>Your preferences</h2>
<h2><%= t('preferences.title') %></h2>
<ul id="prefs">
<li>First name: <span class="highlight"><%= current_user.first_name %></span></li>
<li>Last name: <span class="highlight"><%= current_user.last_name %></span></li>
<li>Date format: <span class="highlight"><%= prefs.date_format %></span> Your current date: <%= format_date(current_user.time) %></li>
<li>Title date format: <span class="highlight"><%= prefs.title_date_format %></span> Your current title date: <%= current_user.time.strftime(prefs.title_date_format) %></li>
<li>Time zone: <span class="highlight"><%= prefs.time_zone %></span> Your current time: <%= current_user.time.strftime('%I:%M %p') %></li>
<li>Week starts on: <span class="highlight"><%= Preference.day_number_to_name_map[prefs.week_starts] %></span></li>
<li>Show the last <span class="highlight"><%= prefs.show_number_completed %></span> completed items</li>
<li>Show completed projects in sidebar: <span class="highlight"><%= prefs.show_completed_projects_in_sidebar %></span></li>
<li>Show hidden projects in sidebar: <span class="highlight"><%= prefs.show_hidden_projects_in_sidebar %></span></li>
<li>Show hidden contexts in sidebar: <span class="highlight"><%= prefs.show_hidden_contexts_in_sidebar %></span></li>
<li>Go to project page on todo complete: <span class="highlight"><%= prefs.show_project_on_todo_done %></span></li>
<li>Staleness starts after <span class="highlight"><%= prefs.staleness_starts %></span> days</li>
<li>Due style: <span class="highlight">
<li><%= User.human_attribute_name('first_name') %>: <span class="highlight"><%= current_user.first_name %></span></li>
<li><%= User.human_attribute_name('last_name') %>: <span class="highlight"><%= current_user.last_name %></span></li>
<li><%= Preference.human_attribute_name('date_format') %>: <span class="highlight"><%= prefs.date_format %></span> Your current date: <%= format_date(current_user.time) %></li>
<li><%= Preference.human_attribute_name('title_date_format') %>: <span class="highlight"><%= prefs.title_date_format %></span> Your current title date: <%= current_user.time.strftime(prefs.title_date_format) %></li>
<li><%= Preference.human_attribute_name('time_zone') %>: <span class="highlight"><%= prefs.time_zone %></span> Your current time: <%= current_user.time.strftime('%I:%M %p') %></li>
<li><%= Preference.human_attribute_name('week_starts') %>: <span class="highlight"><%= t('date.day_names')[prefs.week_starts] %></span></li>
<li><%= t('preferences.show_number_completed', :number=> "<span class=\"highlight\">#{prefs.show_number_completed}</span>")%></li>
<li><%= Preference.human_attribute_name('show_completed_projects_in_sidebar') %>: <span class="highlight"><%= prefs.show_completed_projects_in_sidebar %></span></li>
<li><%= Preference.human_attribute_name('show_hidden_projects_in_sidebar') %>: <span class="highlight"><%= prefs.show_hidden_projects_in_sidebar %></span></li>
<li><%= Preference.human_attribute_name('show_hidden_contexts_in_sidebar') %>: <span class="highlight"><%= prefs.show_hidden_contexts_in_sidebar %></span></li>
<li><%= Preference.human_attribute_name('show_project_on_todo_done') %>: <span class="highlight"><%= prefs.show_project_on_todo_done %></span></li>
<li><%= t('preferences.staleness_starts_after', :days => "<span class=\"highlight\">#{prefs.staleness_starts}</span>") %></li>
<li><%= Preference.human_attribute_name('due_style') %>: <span class="highlight">
<% if prefs.due_style == Preference.due_styles[:due_in_n_days] %>
Due in ___ days
<%= t('models.preference.due_styles')[0] %>
<% else %>
Due on ________
<%= t('models.preference.due_styles')[1] %>
<% end %>
</span></li>
<% if current_user.is_admin? %>
<li>Admin email: <span class="highlight"><%= prefs.admin_email %></span></li>
<li><%= Preference.human_attribute_name('admin_email') %>: <span class="highlight"><%= prefs.admin_email %></span></li>
<% end %>
<li>Refresh interval (in minutes): <span class="highlight"><%= prefs.refresh %></span></li>
<li>Verbose action descriptors: <span class="highlight"><%= prefs.verbose_action_descriptors %></span></li>
<li>Actions per page (Mobile View): <span class="highlight"><%= prefs.mobile_todos_per_page %></span></li>
<li>From email: <span class="highlight"><%= prefs.sms_email %></span></li>
<li>Default email context: <span class="highlight"><%= prefs.sms_context.nil? ? "None" : prefs.sms_context.name %></span></li>
<li><%= Preference.human_attribute_name('refresh') %>: <span class="highlight"><%= prefs.refresh %></span></li>
<li><%= Preference.human_attribute_name('verbose_action_descriptors') %>: <span class="highlight"><%= prefs.verbose_action_descriptors %></span></li>
<li><%= Preference.human_attribute_name('mobile_todos_per_page') %>: <span class="highlight"><%= prefs.mobile_todos_per_page %></span></li>
<li><%= Preference.human_attribute_name('sms_email') %>: <span class="highlight"><%= prefs.sms_email %></span></li>
<li><%= Preference.human_attribute_name('sms_context') %>: <span class="highlight"><%= prefs.sms_context.nil? ? t('preferences.sms_context_none') : prefs.sms_context.name %></span></li>
</ul>
<div class="actions">
<%= link_to "Edit preferences &raquo;", { :controller => 'preferences', :action => 'edit'}, :class => 'edit_link' %>
<%= link_to t('preferences.edit_preferences') + " &raquo;", { :controller => 'preferences', :action => 'edit'}, :class => 'edit_link' %>
</div>
<h2>Your token</h2>
<h2><%= t('preferences.token_header') %></h2>
<div id="token_area">
<div class="description">Token (for feeds and API use):</div>
<div id="token><span class="highlight"><%= current_user.token %></span></div>
<div class="description"><%= t('preferences.token_description') %>:</div>
<div id="token"><span class="highlight"><%= current_user.token %></span></div>
<div class="token_regenerate">
<%= button_to "Generate a new token", refresh_token_user_path(current_user),
:confirm => "Are you sure? Generating a new token will replace the existing one and break any external usages of this token." %>
<%= button_to t('preferences.generate_new_token'), refresh_token_user_path(current_user),
:confirm => t('preferences.generate_new_token_confirm') %>
</div>
</div>
<h2>Your authentication</h2>
<h2><%= t('preferences.authentication_header') %></h2>
<div id="authentication_area">
<% if Tracks::Config.auth_schemes.length > 1 %>
<p>Your authentication type is <span class="highlight"><%= current_user.auth_type %></span>.
<p><%= t('preferences.current_authentication_type', :auth_type => "<span class=\"highlight\">#{current_user.auth_type}</span>") %>.</p>
<div class="actions">
<%= link_to "Change your authentication type &raquo;", change_auth_type_user_path(current_user), :class => 'edit_link' %>
<%= link_to(t('preferences.change_authentication_type') + " &raquo;", change_auth_type_user_path(current_user), :class => 'edit_link') %>
</div>
<% end %>
<% if current_user.auth_type == 'database' %>
<div class="actions">
<%= link_to 'Change your password &raquo;', change_password_user_path(current_user) %>
<%= link_to(t('preferences.change_password') + ' &raquo;', change_password_user_path(current_user)) %>
</div>
<% end %>
<% if current_user.auth_type == 'open_id' %>
<p>Your Open ID URL is <span class="highlight"><%= current_user.open_id_url %></span>.
<p><%= t('preferences.open_id_url') %> <span class="highlight"><%= current_user.open_id_url %></span>.</p>
<div class="actions">
<%= link_to 'Change Your Identity URL &raquo;', change_auth_type_user_path(current_user) %></p>
<%= link_to(t('preferences.change_identity_url') + ' &raquo;', change_auth_type_user_path(current_user)) %>
</div>
<% end %>
</div>

View file

@ -1,6 +1,6 @@
<h2>Active projects</h2><%=
<h2><%= t('projects.active_projects') %></h2><%=
render :partial => 'mobile_project_listing', :collection => @active_projects%>
<h2>Hidden projects</h2><%=
<h2><%= t('projects.hidden_projects') %></h2><%=
render :partial => 'mobile_project_listing', :collection => @hidden_projects %>
<h2>Completed projects</h2><%=
<h2><%= t('projects.completed_projects') %></h2><%=
render :partial => 'mobile_project_listing', :collection => @completed_projects %>

View file

@ -5,23 +5,23 @@
<div class="project_description"><%= sanitize(@project.description) %></div>
<% end -%>
<%= render :partial => "todos/mobile_todo", :collection => @not_done, :locals => { :parent_container_type => "project" }%>
<h2>Deferred actions for this project</h2>
<h2><%= t('projects.deferred_actions')%></h2>
<% if @deferred.empty? -%>
There are no deferred actions for this project
<%= t('projects.deferred_actions_empty') %>
<% else -%>
<%= render :partial => "todos/mobile_todo", :collection => @deferred, :locals => { :parent_container_type => "project" }%>
<% end
-%>
<h2>Completed actions for this project</h2>
<h2><%= t('projects.completed_actions')%></h2>
<% if @done.empty? -%>
There are no completed actions for this project
<%= t('projects.completed_actions_empty') %>
<% else -%>
<%= render :partial => "todos/mobile_todo", :collection => @done, :locals => { :parent_container_type => "project" }%>
<% end %>
<h2>Notes</h2>
<h2><%= t('projects.notes') %></h2>
<% if @project.notes.empty? -%>
There are no notes for this project
<%= t('projects.notes_empty') %>
<% else -%><%= render :partial => "notes/mobile_notes_summary", :collection => @project.notes %>
<% end -%>
<h2>Settings</h2>
This project is <%= project.current_state.to_s %>. <%= @project_default_context %>
<h2><%= t('projects.settings') %></h2>
<%= t('projects.state', :state => project.current_state.to_s) %>. <%= @project_default_context %>

View file

@ -4,18 +4,18 @@
</div>
<%= render :partial => "projects/project", :locals => { :project => @project, :collapsible => false } %>
<%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => false, :append_descriptor => "in this project", :parent_container_type => 'project', :pending => @pending } %>
<%= render :partial => "todos/deferred", :locals => { :deferred => @deferred, :collapsible => false, :append_descriptor => t('projects.todos_append'), :parent_container_type => 'project', :pending => @pending } %>
<% unless @max_completed==0 -%>
<%= render :partial => "todos/completed", :locals => { :done => @done, :collapsible => false, :suppress_project => true, :append_descriptor => "in this project" } %>
<%= render :partial => "todos/completed", :locals => { :done => @done, :collapsible => false, :suppress_project => true, :append_descriptor => t('projects.todos_append') } %>
<% end -%>
<div class="container">
<div id="notes">
<div class="add_note_link"><%= link_to 'Add a note', '#' %> </div>
<div class="add_note_link"><%= link_to t('projects.add_note'), '#' %> </div>
<h2>Notes</h2>
<div id="empty-n" style="display:<%= @project.notes.empty? ? 'block' : 'none'%>;">
<%= render :partial => "shared/empty",
:locals => { :message => "Currently there are no notes attached to this project"} %>
:locals => { :message => t('projects.no_notes_attached')} %>
</div>
<%= render :partial => "notes/notes_summary", :collection => @project.notes %>
</div>
@ -31,7 +31,7 @@
<%= hidden_field( "note", "project_id", "value" => "#{@project.id}" ) %>
<%= text_area( "note", "body", "cols" => 50, "rows" => 3, "tabindex" => 1 ) %>
<br /><br />
<input type="submit" value="Add note" name="add-new-note" tabindex="2" />
<input type="submit" value="<%= t('projects.add_note_submit') %>" name="add-new-note" tabindex="2" />
<% end -%>
</div>
</div>

View file

@ -1,5 +1,5 @@
if @saved
status_message = 'Project saved'
status_message = t('projects.project_saved_status')
page.notify :notice, status_message, 5.0
if source_view_is :project_list
if @state_changed

View file

@ -1,11 +1,11 @@
if @project.default_context.nil?
page.notify :notice, "Removed default context", 5.0
page.notify :notice, t('projects.default_context_removed'), 5.0
else
if source_view_is :project
page['default_context_name_id'].value = @project.default_context.name
page['todo_context_name'].value = @project.default_context.name
end
page.notify :notice, "Set project's default context to #{@project.default_context.name}", 5.0
page.notify :notice, t('projects.default_context_set', :default_context => @project.default_context.name), 5.0
end
page.hide "busy"

View file

@ -1,11 +1,11 @@
if @project.default_tags.nil?
page.notify :notice, "Removed the default tags", 5.0
page.notify :notice, t('projects.default_tags_removed_notice'), 5.0
else
# if source_view_is :project
# page['default_context_name_id'].value = @project.default_context.name
# page['todo_context_name'].value = @project.default_context.name
# end
page.notify :notice, "Set project's default tags to #{@project.default_tags}", 5.0
page.notify :notice, t('projects.set_default_tags_notice', :default_tags => @project.default_tags), 5.0
end
page.hide "busy"

View file

@ -3,5 +3,5 @@ page['todo_project_name'].value = @project.name
page << "enable_rich_interaction();"
status_message = "Name of project was changed"
status_message = t('projects.status_project_name_changed')
page.notify :notice, status_message, 5.0

View file

@ -8,97 +8,96 @@
<div id="recurring_todo_form_container">
<div id="recurring_todo">
<label for="recurring_todo_description">Description</label><%=
<label for="recurring_todo_description"><%= Todo.human_attribute_name('description') %></label><%=
text_field_tag( "recurring_todo[description]", "", "size" => 30, "tabindex" => 1, "maxlength" => 100) -%>
<label for="recurring_todo_notes">Notes</label><%=
<label for="recurring_todo_notes"><%= Todo.human_attribute_name('notes') %></label><%=
text_area_tag( "recurring_todo[notes]", nil, {:cols => 29, :rows => 6, :tabindex => 2}) -%>
<label for="recurring_todo_project_name">Project</label>
<label for="recurring_todo_project_name"><%= Todo.human_attribute_name('project') %></label>
<input id="recurring_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="" />
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
<label for="recurring_todo_context_name">Context</label>
<label for="recurring_todo_context_name"><%= Todo.human_attribute_name('context') %></label>
<input id="recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= current_user.contexts.first.name unless current_user.contexts.first.nil?%>" />
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
<label for="tag_list">Tags (separate with commas)</label>
<label for="tag_list"><%= "#{Todo.human_attribute_name('tags')} #{t('shared.separate_tags_with_commas')}"%></label>
<%= text_field_tag "tag_list", nil, :size => 30, :tabindex => 5 -%>
</div>
</div>
<div id="recurring_period_id">
<div id="recurring_period">
<label>Recurrence period</label><br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'daily', true)%> Daily<br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'weekly')%> Weekly<br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'monthly')%> Monthly<br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'yearly')%> Yearly<br/>
<label><%= t('todos.recurrence_period') %></label><br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'daily', true)%> <%= t('todos.recurrence.daily') %><br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'weekly')%> <%= t('todos.recurrence.weekly') %><br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'monthly')%> <%= t('todos.recurrence.monthly') %><br/>
<%= radio_button_tag('recurring_todo[recurring_period]', 'yearly')%> <%= t('todos.recurrence.yearly') %><br/>
</div>
<div id="recurring_timespan">
<br/>
<label for="recurring_todo[start_from]">Starts on </label><%=
<label for="recurring_todo[start_from]"><%= t('todos.recurrence.starts_on') %>:</label><%=
text_field(:recurring_todo, :start_from, "value" => format_date(current_user.time), "size" => 12, "class" => "Date", "tabindex" => 6, "autocomplete" => "off") %><br/>
<br/>
<label for="recurring_todo[ends_on]">Ends on:</label><br/>
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true)%> No end date<br/>
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times')%> Ends after <%= text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => 7) %> times<br/>
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date')%> Ends on <%= text_field(:recurring_todo, :end_date, "size" => 12, "class" => "Date", "tabindex" => 8, "autocomplete" => "off", "value" => "") %><br/>
<label for="recurring_todo[ends_on]"><%= t('todos.recurrence.ends_on') %>:</label><br/>
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true)%> <%= t('todos.recurrence.no_end_date') %><br/>
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times')%> <%= t('todos.recurrence.ends_on_number_times', :number => text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => 7)) %> <br/>
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date')%> <%= t('todos.recurrence.ends_on_date', :date => text_field(:recurring_todo, :end_date, "size" => 12, "class" => "Date", "tabindex" => 8, "autocomplete" => "off", "value" => "")) %><br/>
</div></div>
<div id="recurring_daily" style="display:block">
<label>Settings for daily recurring actions</label><br/>
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_x_day', true)%> Every <%=
text_field_tag( 'recurring_todo[daily_every_x_days]', "1", {"size" => 3, "tabindex" => 9}) %> day(s)<br/>
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_work_day')%> Every work day<br/>
<label><%= t('todos.recurrence.daily_options') %></label><br/>
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_x_day', true)%> <%= t('todos.recurrence.daily_every_number_day', :number=> text_field_tag( 'recurring_todo[daily_every_x_days]', "1", {"size" => 3, "tabindex" => 9})) %><br/>
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_work_day')%> <%= t('todos.recurrence.every_work_day') %><br/>
</div>
<div id="recurring_weekly" style="display:none">
<label>Settings for weekly recurring actions</label><br/>
Returns every <%= text_field_tag('recurring_todo[weekly_every_x_week]', 1, {"size" => 3, "tabindex" => 9}) %> week on<br/>
<label><%= t('todos.recurrence.weekly_options') %></label><br/>
<%= t('todos.recurrence.weekly_every_number_week', :number => text_field_tag('recurring_todo[weekly_every_x_week]', 1, {"size" => 3, "tabindex" => 9})) %><br/>
<% week_day = Time.new.wday -%>
<%= check_box_tag('recurring_todo[weekly_return_monday]', 'm', week_day == 1 ? true : false) %> Monday
<%= check_box_tag('recurring_todo[weekly_return_tuesday]', 't', week_day == 2 ? true : false) %> Tuesday
<%= check_box_tag('recurring_todo[weekly_return_wednesday]', 'w', week_day == 3 ? true : false) %> Wednesday
<%= check_box_tag('recurring_todo[weekly_return_thursday]', 't', week_day == 4 ? true : false) %> Thursday<br/>
<%= check_box_tag('recurring_todo[weekly_return_friday]', 'f', week_day == 5 ? true : false) %> Friday
<%= check_box_tag('recurring_todo[weekly_return_saturday]', 's', week_day == 6 ? true : false) %> Saturday
<%= check_box_tag('recurring_todo[weekly_return_sunday]', 's', week_day == 0 ? true : false) %> Sunday<br/>
<%# TODO: this should ideally use the 'week starts on' preferences setting, too? %>
<%= check_box_tag('recurring_todo[weekly_return_monday]', 'm', week_day == 1 ? true : false) %> <%= t('date.day_names')[1] %>
<%= check_box_tag('recurring_todo[weekly_return_tuesday]', 't', week_day == 2 ? true : false) %> <%= t('date.day_names')[2] %>
<%= check_box_tag('recurring_todo[weekly_return_wednesday]', 'w', week_day == 3 ? true : false) %> <%= t('date.day_names')[3] %>
<%= check_box_tag('recurring_todo[weekly_return_thursday]', 't', week_day == 4 ? true : false) %> <%= t('date.day_names')[4] %>
<%= check_box_tag('recurring_todo[weekly_return_friday]', 'f', week_day == 5 ? true : false) %> <%= t('date.day_names')[5] %>
<%= check_box_tag('recurring_todo[weekly_return_saturday]', 's', week_day == 6 ? true : false) %> <%= t('date.day_names')[6] %>
<%= check_box_tag('recurring_todo[weekly_return_sunday]', 's', week_day == 0 ? true : false) %> <%= t('date.day_names')[0] %>
</div>
<div id="recurring_monthly" style="display:none">
<label>Settings for monthly recurring actions</label><br/>
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_x_day', true)%> Day <%=
text_field_tag('recurring_todo[monthly_every_x_day]', Time.zone.now.mday, {"size" => 3, "tabindex" => 9}) %> on every <%=
text_field_tag('recurring_todo[monthly_every_x_month]', 1, {"size" => 3, "tabindex" => 10}) %> month<br/>
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_xth_day')%> The <%=
select_tag('recurring_todo[monthly_every_xth_day]', options_for_select(@xth_day), {}) %> <%=
select_tag('recurring_todo[monthly_day_of_week]' , options_for_select(@days_of_week, Time.zone.now.wday), {}) %> of every <%=
text_field_tag('recurring_todo[monthly_every_x_month2]', 1, {"size" => 3, "tabindex" => 11}) %> month<br/>
<label><%= t('todos.recurrence.monthly_options') %></label><br/>
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_x_day', true)%> <%= t('todos.recurrence.day_x_on_every_x_month',
:day => text_field_tag('recurring_todo[monthly_every_x_day]', Time.zone.now.mday, {"size" => 3, "tabindex" => 9}),
:month => text_field_tag('recurring_todo[monthly_every_x_month]', 1, {"size" => 3, "tabindex" => 10})) %><br/>
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_xth_day')%> <%= t('todos.recurrence.monthly_every_xth_day',
:day => select_tag('recurring_todo[monthly_every_xth_day]', options_for_select(@xth_day), {}),
:day_of_week => select_tag('recurring_todo[monthly_day_of_week]' , options_for_select(@days_of_week, Time.zone.now.wday), {}),
:month => text_field_tag('recurring_todo[monthly_every_x_month2]', 1, {"size" => 3, "tabindex" => 11})) %><br/>
</div>
<div id="recurring_yearly" style="display:none">
<label>Settings for yearly recurring actions</label><br/>
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_x_day', true)%> Every <%=
select_tag('recurring_todo[yearly_month_of_year]', options_for_select(@months_of_year, Time.zone.now.month), {}) %> <%=
text_field_tag('recurring_todo[yearly_every_x_day]', Time.zone.now.day, "size" => 3, "tabindex" => 9) %><br/>
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_xth_day')%> The <%=
select_tag('recurring_todo[yearly_every_xth_day]', options_for_select(@xth_day), {}) %> <%=
select_tag('recurring_todo[yearly_day_of_week]', options_for_select(@days_of_week, Time.zone.now.wday), {}) %> of <%=
select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, Time.zone.now.month), {}) %><br/>
<label><%= t('todos.recurrence.yearly_options') %></label><br/>
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_x_day', true)%> <%= t('todos.recurrence.yearly_every_x_day',
:month => select_tag('recurring_todo[yearly_month_of_year]', options_for_select(@months_of_year, Time.zone.now.month), {}),
:day => text_field_tag('recurring_todo[yearly_every_x_day]', Time.zone.now.day, "size" => 3, "tabindex" => 9)) %><br/>
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_xth_day')%><%= t('todos.recurrence.yearly_every_xth_day',
:day => select_tag('recurring_todo[yearly_every_xth_day]', options_for_select(@xth_day), {}),
:day_of_week => select_tag('recurring_todo[yearly_day_of_week]', options_for_select(@days_of_week, Time.zone.now.wday), {}),
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, Time.zone.now.month), {})) %><br/>
</div>
<div id="recurring_target">
<label>Set recurrence on</label><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> the date that the todo is due. Show the todo:
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> always
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> <%= t('todos.recurrence.show_option_always') %>
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', false)%>
<%= text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3, "tabindex" => 12}) %>
days before the todo is due
<%= t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3, "tabindex" => 12})) %>
<br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> the date todo comes from tickler (no due date set)<br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> <%= t('todos.recurrence.from_tickler') %><br/>
<br/>
</div>
<div class="recurring_submit_box">
<div class="widgets">
<button type="submit" class="positive" id="recurring_todo_new_action_submit" tabindex="15">
<%=image_tag("accept.png", :alt => "") %>
Create
<%= t('common.create') %>
</button>
<button type="button" class="positive" id="recurring_todo_new_action_cancel" tabindex="15">
<%=image_tag("cancel.png", :alt => "") %>
Cancel
<%= t('common.cancel') %>
</button>
</div>
</div>

View file

@ -2,11 +2,10 @@ if @saved
if @remaining == 0
page.show 'recurring-todos-empty-nd'
end
page.notify :notice, "The recurring action was deleted succesfully. " +
"The recurrence pattern is removed from " +
pluralize(@number_of_todos, "todo"), 5.0
page.notify :notice, t('todos.recurring_deleted_success') +
t(:todo_removed, :count => @number_of_todos), 5.0
page[@recurring_todo].remove
page.visual_effect :fade, dom_id(@recurring_todo), :duration => 0.4
else
page.notify :error, "There was an error deleting the recurring todo #{@recurring_todo.description}", 8.0
page.notify :error, t('todos.error_deleting_recurring', :description => @recurring_todo.description), 8.0
end

View file

@ -1,19 +1,19 @@
<div id="display_box">
<div class="container recurring_todos">
<h2>Recurring todos</h2>
<h2><%= t('todos.recurring_todos') %></h2>
<div id="recurring_todos_container">
<div id="recurring-todos-empty-nd" style="<%= @no_recurring_todos ? 'display:block' : 'display:none'%>">
<div class="message"><p>Currently there are no recurring todos</p></div>
<div class="message"><p><%= t('todos.no_recurring_todos') %></p></div>
</div>
<%= render :partial => "recurring_todo", :collection => @recurring_todos %>
</div>
</div>
<div class="container recurring_todos_done">
<h2>Recurring todos that are completed</h2>
<h2><%= t('todos.completed_recurring') %></h2>
<div id="completed_recurring_todos_container">
<div id="completed-empty-nd" style="<%= @no_completed_recurring_todos ? 'display:block' : 'display:none'%>">
<div class="message"><p>Currently there are no completed recurring todos</p></div>
<div class="message"><p><%= t('todos.no_completed_recurring') %></p></div>
</div>
<%= render :partial => "recurring_todo", :collection => @completed_recurring_todos %>
</div>
@ -21,13 +21,13 @@
</div>
<div id="input_box">
<div id="recurring_new_container">
<a href='#' onclick="$('new-recurring-todo').show();$('edit-recurring-todo').hide();TracksForm.toggle_overlay()"><%= image_tag("add.png", {:alt => "[ADD]"})-%>Add a new recurring action</a>
<a href='#' onclick="$('new-recurring-todo').show();$('edit-recurring-todo').hide();TracksForm.toggle_overlay()"><%= image_tag("add.png", {:alt => "[ADD]"})-%><%= t('todos.add_new_recurring') %></a>
</div>
</div>
<div id="overlay">
<div id="new-recurring-todo" class="new-form">
<label>Add new recurring action</label><br/>
<label><%= t('todos.add_new_recurring') %></label><br/>
<%= render :partial => "recurring_todo_form" %>
</div>
<div id="edit-recurring-todo" class="edit-form" style="display:none">

View file

@ -18,7 +18,7 @@ if @saved
page.visual_effect :highlight, dom_id(@recurring_todo), :duration => 3
# inform user if a new todo has been created because of the activation
page.notify :notice, "A new todo was added which belongs to this recurring todo", 3.0 unless @new_recurring_todo.nil?
page.notify :notice, t('todos.new_related_todo_created'), 3.0 unless @new_recurring_todo.nil?
# set empty messages
page.show 'completed-empty-nd' if @remaining == 0
@ -26,5 +26,5 @@ if @saved
end
else
page.notify :error, "There was an error completing / activating the recurring todo #{@recurring_todo.description}", 8.0
page.notify :error, t('todos.error_completing_todo', :description => @recurring_todo.description), 8.0
end

View file

@ -3,9 +3,9 @@ if @saved
page << "TracksForm.toggle_overlay();"
# show update message
status_message = 'Recurring action saved'
status_message = 'Added new project / ' + status_message if @new_project_created
status_message = 'Added new context / ' + status_message if @new_context_created
status_message = t('todos.recurring_action_saved')
status_message = t('todos.added_new_project') + ' / ' + status_message if @new_project_created
status_message = t('todos.added_new_context') + ' / ' + status_message if @new_context_created
page.notify :notice, status_message, 5.0
# replace old recurring todo with updated todo

View file

@ -1,6 +1,6 @@
<div id="display_box_search">
<% form_tag({:action => :results}, :id => 'search-form') do %>
<%= text_field_tag(:search, params[:search]) %>
<%= submit_tag "Search" %>
<%= submit_tag t('common.search') %>
<% end %>
</div>

View file

@ -1,24 +1,24 @@
<div id="display_box_results">
<% if @count == 0 -%>
<div class="message"><p>Your search yielded no results.</p></div>
<div class="message"><p><%= t('search.no_results') %></p></div>
<% else -%>
<% unless @found_todos.empty? -%>
<div id="found-todos-container" class="container">
<h2><span id="found-todos-count" class="badge"><%= @found_todos.size %></span>Todos matching query</h2>
<h2><span id="found-todos-count" class="badge"><%= @found_todos.size %></span><%= t('search.todos_matching_query') %></h2>
<%= render :partial => "todos/todo", :collection => @found_todos, :locals => { :parent_container_type => 'search', :suppress_context => false, :suppress_project => false, :suppress_edit_button => true } %>
</div>
<% end -%>
<% unless @found_projects.empty? -%>
<div id="found-projects-container" class="container">
<h2><span id="found-projects-count" class="badge"><%= @found_projects.size %></span>Projects matching query</h2>
<h2><span id="found-projects-count" class="badge"><%= @found_projects.size %></span><%= t('search.projects_matching_query') %></h2>
<%= render :partial => "projects/project_listing", :collection => @found_projects, :locals => { :suppress_drag_handle => true, :suppress_edit_button => true } %>
</div>
<% end -%>
<% unless @found_notes.empty? -%>
<div id="found-notes-container" class="container">
<h2><span id="found-notes-count" class="badge"><%= @found_notes.size %></span>Notes matching query</h2>
<h2><span id="found-notes-count" class="badge"><%= @found_notes.size %></span><%= t('search.notes_matching_query') %></h2>
<% for notes in @found_notes -%>
<div class="container" id="note-<%= notes.id %>-wrapper">
<%= render :partial => "notes/notes_summary", :object => notes %>
@ -29,14 +29,14 @@
<% unless @found_contexts.empty? -%>
<div id="found-contexts-container" class="container">
<h2><span id="found-contexts-count" class="badge"><%= @found_contexts.size %></span>Contexts matching query</h2>
<h2><span id="found-contexts-count" class="badge"><%= @found_contexts.size %></span><%= t('search.contexts_matching_query') %></h2>
<%= render :partial => "contexts/context_listing", :collection => @found_contexts, :locals => { :suppress_drag_handle => true, :suppress_edit_button => true } %>
</div>
<% end -%>
<% unless @found_tags.empty? -%>
<div id="found-tags-container" class="container">
<h2><span id="found-tags-count" class="badge"><%= @found_tags.size %></span>Tags matching query</h2>
<h2><span id="found-tags-count" class="badge"><%= @found_tags.size %></span><%= t('search.tags_matching_query') %></h2>
<span class="tags"><% @found_tags.each do |tag| -%>
<span class="tag"><%= link_to tag.name, {:controller => "todos", :action => "tag", :id => tag.name} -%></span>
<% end %>

View file

@ -8,8 +8,8 @@
<div id="todo_new_action_container">
<div id="toggle_forms" class="toggle_forms">
<a title="Hide new action form" accesskey="n" href="#" id="toggle_action_new">&laquo; Hide form</a> |
<a title="Toggle single/multi new action form" accesskey="m" href="#" id="toggle_multi">Add multiple next actions</a>
<a title="<%= t('shared.hide_action_form_title') %>" accesskey="n" href="#" id="toggle_action_new">&laquo; <%= t('shared.hide_form') %></a>
<a title="<%= t('shared.toggle_multi_title') %>" accesskey="m" href="#" id="toggle_multi"><%= t('shared.toggle_multi') %></a>
</div>
<div id="todo_new_action" style="display:block">
@ -22,39 +22,39 @@
<div id="status"><%= error_messages_for("item", :object_name => 'action') %></div>
<label for="todo_description">Description</label>
<label for="todo_description"><%= Todo.human_attribute_name('description') %></label>
<%= text_field( "todo", "description", "size" => 30, "tabindex" => 1, "maxlength" => 100, "autocomplete" => "off", :autofocus => 1) %>
<label for="todo_notes">Notes</label>
<label for="todo_notes"><%= Todo.human_attribute_name('notes') %></label>
<%= text_area( "todo", "notes", "cols" => 29, "rows" => 6, "tabindex" => 2) %>
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%=@initial_project_name-%>" />
<label for="todo_project_name">Project</label>
<label for="todo_project_name"><%= Todo.human_attribute_name('project') %></label>
<input id="todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%= @initial_project_name %>" />
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
<input id="default_context_name_id" name="default_context_name" type="hidden" value="<%=@initial_context_name-%>" />
<label for="todo_context_name">Context</label>
<label for="todo_context_name"><%= Todo.human_attribute_name('context') %></label>
<input id="todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= @initial_context_name %>" />
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
<label for="tag_list">Tags (separate with commas)</label>
<label for="tag_list"><%= Todo.human_attribute_name('tags') + ' (' + t('shared.separate_tags_with_commas') + ')' %></label>
<%= text_field_tag "tag_list", @default_tags, :size => 30, :tabindex => 5 %>
<%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
<div class="due_input">
<label for="todo_due">Due</label>
<label for="todo_due"><%= Todo.human_attribute_name('due') %></label>
<%= text_field("todo", "due", "size" => 12, "class" => "Date", "tabindex" => 6, "autocomplete" => "off") %>
</div>
<div class="show_from_input">
<label for="todo_show_from">Show from</label>
<label for="todo_show_from"><%= Todo.human_attribute_name('show_from') %></label>
<%= text_field("todo", "show_from", "size" => 12, "class" => "Date", "tabindex" => 7, "autocomplete" => "off") %>
</div>
<label for="predecessor_list">Depends on</label>
<label for="predecessor_list"><%= Todo.human_attribute_name('predecessors')%></label>
<%= text_field_tag "predecessor_list", nil, :size => 30, :tabindex => 8 %>
<%= source_view_tag( @source_view ) %>
<%= hidden_field_tag :_tag_name, @tag_name.underscore.gsub(/\s+/,'_') if source_view_is :tag %>
@ -62,7 +62,7 @@
<div class="submit_box">
<div class="widgets">
<button type="submit" class="positive" id="todo_new_action_submit" tabindex="8">
<%= image_tag("accept.png", :alt => "") %>Add action
<%= image_tag("accept.png", :alt => "") + t('shared.add_action') %>
</button>
</div>
</div>
@ -80,29 +80,29 @@
<div id="multiple_status"><%= error_messages_for("item", :object_name => 'action') %></div>
<label for="todo_notes">Multiple next actions (one on each line)</label>
<label for="todo_notes"><%= t('shared.multiple_next_actions') %></label>
<%= text_area( "todo", "multiple_todos", "cols" => 29, "rows" => 6, "tabindex" => 2) %>
<input id="default_project_name_id" name="default_project_name" type="hidden" value="<%=@initial_project_name-%>" />
<label for="todo_project_name">Project for all actions</label>
<label for="todo_project_name"><%= t('shared.project_for_all_actions') %></label>
<input id="multi_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%= @initial_project_name %>" />
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
<input id="default_context_name_id" name="default_context_name" type="hidden" value="<%=@initial_context_name-%>" />
<label for="todo_context_name">Context for all actions</label>
<label for="todo_context_name"><%= t('shared.context_for_all_actions') %></label>
<input id="multi_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= @initial_context_name %>" />
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
<label for="tag_list">Tags for all actions (sep. with commas)</label>
<label for="tag_list"><%= t('shared.tags_for_all_actions') + ' (' + t('shared.separate_tags_with_commas') +')' %></label>
<%= text_field_tag "multi_tag_list", @default_tags, :name=>:tag_list, :size => 30, :tabindex => 5 %>
<%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
<div class="submit_box">
<div class="widgets">
<button type="submit" class="positive" id="todo_multi_new_action_submit" tabindex="8">
<%= image_tag("accept.png", :alt => "") %>Add actions
<%= image_tag("accept.png", :alt => "") %><%= t('shared.add_actions') %>
</button>
</div>
</div>

View file

@ -1,7 +1,7 @@
<h3><%= list_name %> (<%= contexts.length %>)</h3>
<ul>
<% if contexts.empty? -%>
<li>None</li>
<li><%= t('sidebar.list_empty') %></li>
<% else -%>
<%= render :partial => "sidebar/context", :collection => contexts -%>
<% end -%>

View file

@ -1,7 +1,7 @@
<h3><%= list_name %> (<%= projects.length %>)</h3>
<ul>
<% if projects.empty? %>
<li>None</li>
<li><%= t('sidebar.list_empty') %></li>
<% else %>
<%= render :partial => "sidebar/project", :collection => projects %>
<% end %>

View file

@ -2,28 +2,28 @@
<% # show active items before hidden / completed items -%>
<%= render :partial => "sidebar/project_list",
:locals => { :list_name => 'Active Projects',
:locals => { :list_name => t('sidebar.list_name_active_projects'),
:projects => @active_projects } -%>
<%= render :partial => "sidebar/context_list",
:locals => { :list_name => 'Active Contexts',
:locals => { :list_name => t('sidebar.list_name_active_contexts'),
:contexts => @active_contexts } -%>
<% if prefs.show_hidden_projects_in_sidebar -%>
<%= render :partial => "sidebar/project_list",
:locals => { :list_name => 'Hidden Projects',
:locals => { :list_name => t('sidebar.list_name_hidden_projects'),
:projects => @hidden_projects } -%>
<% end -%>
<% if prefs.show_completed_projects_in_sidebar -%>
<%= render :partial => "sidebar/project_list",
:locals => { :list_name => 'Completed Projects',
:locals => { :list_name => t('sidebar.list_name_completed_projects'),
:projects => @completed_projects } -%>
<% end -%>
<% if prefs.show_hidden_contexts_in_sidebar -%>
<%= render :partial => "sidebar/context_list",
:locals => { :list_name => 'Hidden Contexts',
:locals => { :list_name => t('sidebar.list_name_hidden_contexts'),
:contexts => @hidden_contexts } -%>
<% end -%>

View file

@ -1,11 +1,11 @@
<p>Of all your completed actions, the average time to complete is <%= (@actions_avg_ttc*10).round/10.0 %> days.
The Max-/minimum days to complete is <%= (@actions_max_ttc*10).round/10.0%>/<%= (@actions_min_ttc*10).round/10.0 %>.
The minimum time to complete is <%= @actions_min_ttc_sec %></p>
<p><%= t('stats.actions_avg_completion_time', :count => (@actions_avg_ttc*10).round/10.0) %>
<%= t('stats.actions_min_max_completion_days', :min=> (@actions_max_ttc*10).round/10.0, :max => (@actions_min_ttc*10).round/10.0) %>
<%= t('stats.actions_min_completion_time', :time => @actions_min_ttc_sec) %></p>
<p>In the last 30 days you created on average <%=(@sum_actions_created_last30days*10.0/30.0).round/10.0 %> actions
and completed on average <%=(@sum_actions_done_last30days*10.0/30.0).round/10.0%> actions per day.
In the last 12 months you created on average <%=(@sum_actions_created_last12months*10.0/12.0).round/10.0 %> actions
and completed on average <%= (@sum_actions_done_last12months*10.0/12.0).round/10.0%> actions per month.</p>
<p><%= t('stats.actions_actions_avg_created_30days', :count => (@sum_actions_created_last30days*10.0/30.0).round/10.0 )%>
<%= t('stats.actions_avg_completed_30days', :count => (@sum_actions_done_last30days*10.0/30.0).round/10.0 )%>
<%= t('stats.actions_avg_created', :count => (@sum_actions_created_last12months*10.0/12.0).round/10.0 )%>
<%= t('stats.actions_avg_completed', :count => (@sum_actions_done_last12months*10.0/12.0).round/10.0 )%></p>
<% %w{ actions_done_last30days_data
actions_done_last12months_data

View file

@ -5,7 +5,7 @@
<br style="clear:both">
<div class="stats_module">
<h3>Top 5 Contexts</h3>
<h3><%= t('stats.top5_contexts') %></h3>
<%
1.upto 5 do |i|
%><%=i-%> -
@ -19,7 +19,7 @@
</div>
<div class="stats_module">
<h3>Top 5 Visible Contexts with incomplete actions</h3>
<h3><%= t('stats.top5_visible_contexts_with_incomplete_actions') %></h3>
<%
1.upto 5 do |i|
%><%=i-%> -

View file

@ -1,5 +1,5 @@
<div class="stats_module">
<h3>Top 10 projects</h3>
<h3><%= t('stats.top10_projects') %></h3>
<% i=0
@projects_and_actions.each do |p|
i+=1 -%>
@ -14,7 +14,7 @@
</div>
<div class="stats_module">
<h3>Top 10 project in past 30 days</h3>
<h3><%= t('stats.top10_projects_30days') %></h3>
<% i=0
@projects_and_actions_last30days.each do |p|
i+=1 -%>
@ -29,7 +29,7 @@
</div>
<div class="stats_module">
<h3>Top 10 longest running projects</h3>
<h3><%= t('stats.top10_longrunning') %></h3>
<% i=0
@projects_and_runtime.each do |id, name, days|
i+=1 -%>

View file

@ -1,10 +1,10 @@
<div class="stats_module">
<h3>Tag Cloud for all actions</h3>
<p>This tag cloud includes tags of all actions (completed, not completed, visible and/or hidden)</p>
<h3><%= t('stats.tag_cloud_title') %></h3>
<p><%= t('stats.tag_cloud_description') %></p>
<p>
<% if @tags_for_cloud.size < 1
%> no tags available <%
t('stats.no_tags_available')
else
@tags_for_cloud.each do |t| %>
<%= link_to t.name,
@ -18,12 +18,11 @@
</div>
<div class="stats_module">
<h3>Tag Cloud actions in past 90 days</h3>
<p>This tag cloud includes tags of actions that were created or completed in
the past 90 days.</p>
<h3><%= t('stats.tag_cloud_90days_title') %></h3>
<p><%= t('stats.tag_cloud_90days_description') %></p>
<p>
<% if @tags_for_cloud_90days.size < 1
%> no tags available <%
t('stats.no_tags_available')
else
@tags_for_cloud_90days.each do |t| %>
<%= link_to t.name,

View file

@ -1,23 +1,23 @@
<p>You have <%= @projects.count%> projects.
Of those <%= @projects.active.count%> are active projects,
<%= @projects.hidden.count%> hidden projects and
<%= @projects.completed.count%> completed projects</p>
<p><%= t('stats.totals_project_count', :count => @projects.count) %>
<%= t('stats.totals_active_project_count', :count => @projects.active.count) %>,
<%= t('stats.totals_hidden_project_count', :count => @projects.hidden.count) %>
<%= t('stats.totals_completed_project_count', :count => @projects.completed.count) %></p>
<p>You have <%= @contexts.count%> contexts.
Of those <%= @contexts.active.count%> are visible contexts and
<%= @contexts.hidden.count%> are hidden contexts
<p><%= t('stats.totals_context_count', :count => @contexts.count ) %>
<%= t('stats.totals_visible_context_count', :count => @contexts.active.count) %>
<%= t('stats.totals_hidden_context_count', :count => @contexts.hidden.count) %>
<% unless @actions.empty? -%>
<p>Since your first action on <%= format_date(@first_action.created_at) %>
you have a total of <%= @actions.count %> actions.
<%= @actions.completed.count %> of these are completed.
<p><%= t('stats.totals_first_action', :date => format_date(@first_action.created_at)) %>
<%= t('stats.totals_action_count', :count => @actions.count) %>,
<%= t('stats.totals_actions_completed', :count => @actions.completed.count) %>
<p>You have <%= @actions.not_completed.count %> incomplete actions
of which <%= @actions.deferred.count %> are deferred actions
in the tickler and <%= @actions.blocked.count %> are dependent on the completion of other actions.
<p><%= t('stats.totals_incomplete_actions', :count => @actions.not_completed.count) %>
<%= t('stats.totals_deferred_actions', :count => @actions.deferred.count) %>
<%= t('stats.totals_blocked_actions', :count => @actions.blocked.count) %>
</p>
<p>You have <%= @tags_count-%> tags placed on actions. Of those tags,
<%= @unique_tags_count -%> are unique.
<p><%= t('stats.totals_tag_count', :count => @tags_count) %>
<%= t('stats.totals_unique_tags', :count => @unique_tags_count) %>
<% end -%>

View file

@ -1,7 +1,7 @@
&title=Completion time (all completed actions),{font-size:16},&
&y_legend=Actions,10,0x8010A0&
&y2_legend=Percentage,10,0xFF0000&
&x_legend=Running time of an action (weeks),12,0x736AFF&
&title=<%= t('stats.action_completion_time_title') %>,{font-size:16},&
&y_legend=<%= t('stats.legend.actions') %>,10,0x8010A0&
&y2_legend=<%= t('stats.legend.percentage') %>,10,0xFF0000&
&x_legend=<%= t('stats.legend.running_time') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0&
&values=

View file

@ -1,9 +1,9 @@
&title=Day of week (past 30 days),{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Day of week,12,0x736AFF&
&title=<%= t('stats.actions_dow_30days_title') %>,{font-size:16},&
&y_legend=<%= t('stats.actions_dow_30days_legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.actions_dow_30days_legend.day_of_week') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,8&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,8&
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created') %>,8&
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,8&
&values=<%
0.upto 5 do |i| -%>
<%=@actions_creation_day_array[i] -%>,

View file

@ -1,9 +1,9 @@
&title=Day of week (all actions),{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Day of week,12,0x736AFF&
&title=<%= t('stats.actions_day_of_week_title') %>,{font-size:16},&
&y_legend=<%= t('stats.actions_day_of_week_legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.actions_day_of_week_legend.day_of_week') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,8&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,8&
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created')%>,8&
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,8&
&values=<%
0.upto 5 do |i| -%>
<%=@actions_creation_day_array[i] -%>,

View file

@ -1,13 +1,13 @@
&title=Actions in the last 12 months,{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Months ago,12,0x736AFF&
&title=<%= t('stats.actions_lastyear_title') %>,{font-size:16},&
&y_legend=<%= t('stats.legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.legend.months_ago') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,9&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,9&
&line_3=2,0x00FF00, Avg Created, 9&
&line_4=2,0xFF0000, Avg Completed, 9&
&line_5=2,0x007700, 3 Month Avg Created, 9&
&line_6=2,0xAA0000, 3 Month Avg Completed, 9&
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created')%>,9&
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,9&
&line_3=2,0x00FF00, <%= t('stats.labels.avg_created') %>, 9&
&line_4=2,0xFF0000, <%= t('stats.labels.avg_completed') %>, 9&
&line_5=2,0x007700, <%= t('stats.labels.month_avg_created', :months => 3) %>, 9&
&line_6=2,0xAA0000, <%= t('stats.labels.month_avg_completed', :months => 3) %>, 9&
&line_7=1,0xAA0000&
&line_8=1,0x007700&
&values=<% 0.upto 11 do |i| -%><%= @actions_created_last12months_hash[i]%>,<% end -%><%= @actions_created_last12months_hash[12]%>&

View file

@ -1,11 +1,11 @@
&title=Actions in the last 30 days,{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Number of days ago,12,0x736AFF&
&title=<%= t('stats.actions_30days_title') %>,{font-size:16},&
&y_legend=<%= t('stats.legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.legend.number_of_days') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,9&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,9&
&line_3=3,0x00FF00, Avg Created, 9&
&line_4=3,0xFF0000, Avg Completed, 9&
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created') %>,9&
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,9&
&line_3=3,0x00FF00, <%= t('stats.labels.avg_created') %>, 9&
&line_4=3,0xFF0000, <%= t('stats.labels.avg_completed') %>, 9&
&values=
<% 0.upto 29 do |i| -%>
<%= @actions_created_last30days_hash[i]%>,

View file

@ -1,2 +1,2 @@
<%= render :partial => 'chart', :locals => {:width => @chart_width, :height => @chart_height, :data => url_for(:action => :actions_done_lastyears_data)} -%>
Click <%=link_to "here", {:controller => "stats", :action => "index"} %> to return to the statistics page.
<%= t('stats.click_to_return', :link => link_to(t('stats.click_to_return_link'), {:controller => "stats", :action => "index"})) %>

View file

@ -1,13 +1,13 @@
&title=Actions in the last years,{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Months ago,12,0x736AFF&
&title=<%= t('stats.actions_last_year') %>,{font-size:16},&
&y_legend=<%= t('stats.actions_last_year_legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.actions_last_year_legend.months_ago') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,9&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,9&
&line_3=2,0x00FF00, Avg Created, 9&
&line_4=2,0xFF0000, Avg Completed, 9&
&line_5=2,0x007700, 3 Month Avg Created, 9&
&line_6=2,0xAA0000, 3 Month Avg Completed, 9&
&line_3=2,0x00FF00, <%= t('stats.labels.avg_created') %>, 9&
&line_4=2,0xFF0000, <%= t('stats.labels.avg_completed') %>, 9&
&line_5=2,0x007700, <%= t('stats.labels.month_avg_created', :months => 3) %>, 9&
&line_6=2,0xAA0000, <%= t('stats.labels.month_avg_completed', :months => 3) %>, 9&
&line_7=1,0xAA0000&
&line_8=1,0x007700&
&values=<% 0.upto @month_count-1 do |i| -%><%= @actions_created_last_months_hash[i]%>,<% end -%><%= @actions_created_last_months_hash[@month_count]%>&

View file

@ -1,7 +1,7 @@
&title=Current running time of all incomplete actions,{font-size:16},&
&y_legend=Actions,10,0x736AFF&
&y2_legend=Percentage,10,0xFF0000&
&x_legend=Running time of an action (weeks). Click on a bar for more info,11,0x736AFF&
&title=<%= t('stats.running_time_all') %>,{font-size:16},&
&y_legend=<%= t('stats.running_time_all_legend.actions') %>",10,0x736AFF&
&y2_legend=<%= t('stats.running_time_all_legend.percentage') %>,10,0xFF0000&
&x_legend=<%= t('stats.running_time_all_legend.running_time') %>,11,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0&
&values=

View file

@ -1,9 +1,9 @@
&title=Time of day (last 30 days),{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Time of Day,12,0x736AFF&
&title=<%= t('stats.tod30') %>,{font-size:16},&
&y_legend=<%= t('stats.tod30_legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.tod30_legend.time_of_day') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,8&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,8&
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created') %>,8&
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,8&
&values=<%
0.upto 22 do |i| -%>
<%=@actions_creation_hour_array[i] -%>,

View file

@ -1,9 +1,9 @@
&title=Time of day (all actions),{font-size:16},&
&y_legend=Number of actions,12,0x736AFF&
&x_legend=Time of Day,12,0x736AFF&
&title=<%= t('stats.time_of_day') %>,{font-size:16},&
&y_legend=<%= t('stats.time_of_day_legend.number_of_actions') %>,12,0x736AFF&
&x_legend=<%= t('stats.time_of_day_legend.time_of_day') %>,12,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0,Created,8&
&filled_bar_2=50,0x0066CC,0x0066CC,Completed,8&
&filled_bar=50,0x9933CC,0x8010A0,<%= t('stats.labels.created') %>,8&
&filled_bar_2=50,0x0066CC,0x0066CC,<%= t('stats.labels.completed') %>,8&
&values=<%
0.upto 22 do |i| -%>
<%=@actions_creation_hour_array[i] -%>,

View file

@ -1,7 +1,7 @@
&title=Current running time of incomplete visible actions,{font-size:16},&
&y_legend=Actions,10,0x736AFF&
&y2_legend=Percentage,10,0xFF0000&
&x_legend=Running time of an action (weeks). Click on a bar for more info,11,0x736AFF&
&title=<%= t('stats.current_running_time_of_incomplete_visible_actions') %>,{font-size:16},&
&y_legend=<%= t('stats.running_time_legend.actions') %>,10,0x736AFF&
&y2_legend=<%= t('stats.running_time_legend.percentage') %>,10,0xFF0000&
&x_legend=<%= t('stats.running_time_legend.weeks') %>,11,0x736AFF&
&y_ticks=5,10,5&
&filled_bar=50,0x9933CC,0x8010A0&
&values=

View file

@ -1,4 +1,4 @@
&title=Spread of running actions for visible contexts,{font-size:16}&
&title=<%= t('stats.spread_of_running_actions_for_visible_contexts') %>,{font-size:16}&
&pie=60,#505050,{font-size: 12px; color: #404040;}&
&x_axis_steps=1& &y_ticks=5,10,5& &line=3,#87421F& &y_min=0& &y_max=20&
&values=<%

View file

@ -1,4 +1,4 @@
&title=Spread of actions for all context,{font-size:16}&
&title=<%= t('stats.spread_of_actions_for_all_context') %>,{font-size:16}&
&pie=70,#505050,{font-size: 12px; color: #404040;}&
&x_axis_steps=1& &y_ticks=5,10,5& &line=3,#87421F& &y_min=0& &y_max=20&
&values=<%

View file

@ -1,29 +1,29 @@
<div class="stats_content">
<h2>Totals</h2>
<h2><%= t('stats.totals') %></h2>
<%= render :partial => 'totals' -%>
<% unless @actions.empty? -%>
<h2>Actions</h2>
<h2><%= t('stats.actions') %></h2>
<%= render :partial => 'actions' -%>
<h2>Contexts</h2>
<h2><%= t('stats.contexts') %></h2>
<%= render :partial => 'contexts' -%>
<h2>Projects</h2>
<h2><%= t('stats.projects') %></h2>
<%= render :partial => 'projects' -%>
<h2>Tags</h2>
<h2><%= t('stats.tags') %></h2>
<%= render :partial => 'tags' -%>
<% else -%>
<p>More statistics will appear here once you have added some actions.</p>
<p><%= t('stats.more_stats_will_appear') %></p>
<% end -%>

View file

@ -1,17 +1,15 @@
<%= 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><%= t('stats.click_to_update_actions') %> <%= t('stats.click_to_return', :link => link_to(t('stats.click_to_return_link'), {:controller => "stats", :action => "index"})) %> <%
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." -%>
t('stats.click_to_show_actions_from_week', :link => link_to("here", {:controller => "stats", :action => "show_selected_actions_from_chart", :id=>"#{params[:id]}_end", :index => params[:index]}), :week => params[:index]) -%>
<% end %></p>
<br/>
<div class="container tickler" id="tickler_container">
<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 class="message"><p><%= t('stats.no_actions_selected') %></p></div>
</div>
<%= render :partial => "todos/todo", :collection => @selected_actions, :locals => { :parent_container_type => 'stats' } %>
</div>

View file

@ -1,5 +1,5 @@
<h2>Next action description (<%= link_to "Go back", @return_path %>)</h2>
<%= link_to @todo.description, todo_path(@todo, :format => 'm') -%></h2>
<h2>Notes</h2>
<h2><%= t('todos.next_action_description') + link_to(t('common.go_back'), @return_path) %>)</h2>
<%= link_to @todo.description, todo_path(@todo, :format => 'm') -%>
<h2><%= t('todos.notes') %></h2>
<%= format_note(@todo.notes) %>
<%= link_to "Back", @return_path %>
<%= link_to t('common.back'), @return_path %>

View file

@ -1,25 +1,25 @@
<div id="display_box">
<% 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>
<h2><%= t('todos.no_actions_found') %></h2>
<div class="message"><%= t('todos.no_actions_with', :tag_name => @tag_name) %></div>
</div>
<% end -%>
<%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show -%>
<h2>Deferred actions with the tag <%= @tag_name %></h2>
<h2><%= t('todos.deferred_actions_with', :tag_name=> @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 %>
<%= t('todos.no_deferred_actions_with', :tag_name => @tag_name) %>
<% end -%>
<h2>Completed actions with the tag <%= @tag_name %></h2>
<h2><%= t('todos.completed_actions_with', :tag_name => @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 %>
<%= t('todos.no_completed_actions_with', :tag_name => @tag_name) %>
<% end -%>
</div>

View file

@ -1,5 +1,5 @@
<% form_tag todos_path(:format => 'm'), :method => :post do %>
<%= render :partial => 'edit_mobile' %>
<p><input type="submit" value="Create" tabindex="12" accesskey="#" /></p>
<p><input type="submit" value="<%= t('common.create') %>" tabindex="12" accesskey="#" /></p>
<% end -%>
<%= link_to "Back", @return_path %>
<%= link_to t('common.back'), @return_path %>

View file

@ -1,5 +1,5 @@
if @removed
status_message = "Removed #{@successor.description} as dependency from #{@predecessor.description}."
status_message = t('todos.removed_predecessor', :successor => @successor.description, :predecessor => @predecessor.description)
page.notify :notice, status_message, 5.0
# replace old predecessor with one without the successor
@ -31,5 +31,5 @@ if @removed
end
page << "enable_rich_interaction();"
else
page.notify :error, "There was an error removing the dependency", 8.0
page.notify :error, t('todos.error_removing_dependency'), 8.0
end

View file

@ -1,5 +1,5 @@
<% form_tag todo_path(@todo, :format => 'm'), :method => :put do %>
<%= render :partial => 'edit_mobile', :locals => { :parent_container_type => "show_mobile" } %>
<p><input type="submit" value="Update" tabindex="6" accesskey="#" /></p>
<p><input type="submit" value="<%= t('common.update') %>" tabindex="6" accesskey="#" /></p>
<% end -%>
<%= link_to "Cancel", @return_path %>
<%= link_to t('common.cancel'), @return_path %>

View file

@ -1,7 +1,7 @@
<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>
<h2><%= t('todos.no_actions_found')%></h2>
<div class="message"><p><%= t('todos.no_actions_with', :tag_name=>@tag_name) %></p></div>
</div>
<%= render :partial => "contexts/context", :collection => @contexts_to_show,
@ -12,18 +12,18 @@
:deferred => @deferred,
:pending => @pending,
:collapsible => true,
:append_descriptor => "tagged with &lsquo;#{@tag_name}&rsquo;",
:append_descriptor => t('todos.tagged_with', :tag_name => @tag_name),
:parent_container_type => 'tag'
} %>
<% end -%>
<% unless @hidden_todos.nil? -%>
<%= render :partial => "todos/hidden", :locals => { :hidden => @hidden_todos, :collapsible => true, :append_descriptor => "tagged with &lsquo;#{@tag_name}&rsquo;" } %>
<%= render :partial => "todos/hidden", :locals => { :hidden => @hidden_todos, :collapsible => true, :append_descriptor => t('todos.tagged_with', :tag_name => @tag_name) } %>
<% end -%>
<% unless @done.nil? -%>
<%= render :partial => "todos/completed",
:locals => { :done => @done, :collapsible => true, :append_descriptor => "tagged with &lsquo;#{@tag_name}&rsquo;" } %>
:locals => { :done => @done, :collapsible => true, :append_descriptor => t('todos.tagged_with', :tag_name => @tag_name) } %>
<% end -%>
</div><!-- End of display_box -->

View file

@ -38,7 +38,7 @@ if @saved
page.visual_effect :highlight, dom_id(@new_recurring_todo, 'line'), {'startcolor' => "'#99ff99'"}
else
if @todo.recurring_todo.todos.active.count == 0
page.notify :notice, "There is no next action after the recurring action you just finished. The recurrence is completed", 6.0 if @new_recurring_todo.nil?
page.notify :notice, t('todos.recurrence_completed'), 6.0 if @new_recurring_todo.nil?
end
end
end
@ -68,5 +68,5 @@ if @saved
page.redirect_to project_path(@todo.project_id)
end
else
page.replace_html "status", content_tag("div", content_tag("h2", "#{pluralize(@todo.errors.count, "error")} prohibited this action from being saved") + content_tag("p", "There were problems with the following fields:") + content_tag("ul", @todo.errors.each_full { |msg| content_tag("li", msg) }), "id" => "errorExplanation", "class" => "errorExplanation")
page.replace_html "status", content_tag("div", content_tag("h2", t(:todo_errors, :count => @todo.errors.count)) + content_tag("p", t('common.errors_with_fields')) + content_tag("ul", @todo.errors.each_full { |msg| content_tag("li", msg) }), "id" => "errorExplanation", "class" => "errorExplanation")
end

View file

@ -1,9 +1,8 @@
if @saved
# show update message
status_message = 'Action saved'
status_message += ' to tickler' if @todo.deferred?
status_message = 'Added new project / ' + status_message if @new_project_created
status_message = 'Added new context / ' + status_message if @new_context_created
status_message = @todo.deferred? ? t('todos.action_saved_to_tickler') : t('todos.action_saved')
status_message = t('todos.added_new_project') + ' / ' + status_message if @new_project_created
status_message = t('todos.added_new_context') + ' / ' + status_message if @new_context_created
status_message = @message || status_message
page.notify :notice, status_message, 5.0

View file

@ -1,15 +1,15 @@
<div id="single_box" class="container context authtype_container">
<h2>Change authentication type</h2>
<h2><%= t('users.change_authentication_type') %></h2>
<%= error_messages_for 'user' %>
<p>Select your new authentication type and click 'Change Authentication Type' to replace your current settings.</p>
<p><%= t('users.select_authentication_type') %></p>
<% form_tag :action => 'update_auth_type' do %>
<div><label for="user_auth_type">Authentication type:</label> <%= select('user', 'auth_type', Tracks::Config.auth_schemes.collect {|p| [ p, p ] }) %></div>
<div id="open_id" style="display:<%= current_user.auth_type == 'open_id' ? 'block' : 'none' %>"><label for="user_open_id_url">Identity URL:</label> <input type="text" name="openid_url" value="<%= current_user.open_id_url %>" class="open_id" /></div>
<div class="actions"><%= submit_tag 'Change Authentication Type' %> <%= link_to 'Cancel', preferences_path %></div>
<div><label for="user_auth_type"><%= t('users.label_auth_type') %>:</label> <%= select('user', 'auth_type', Tracks::Config.auth_schemes.collect {|p| [ p, p ] }) %></div>
<div id="open_id" style="display:<%= current_user.auth_type == 'open_id' ? 'block' : 'none' %>"><label for="openid_url"><%= t('users.identity_url') %>:</label> <input type="text" name="openid_url" value="<%= current_user.open_id_url %>" class="open_id" /></div>
<div class="actions"><%= submit_tag t('users.auth_change_submit') %> <%= link_to t('common.cancel'), preferences_path %></div>
<%= observe_field( :user_auth_type, :function => "$('open_id').style.display = value == 'open_id' ? 'block' : 'none'") %>

View file

@ -4,21 +4,21 @@
<%= error_messages_for 'user' %>
<p>Enter your new password in the fields below and click 'Change Password' to replace your current password with your new one.</p>
<p><%= t('users.change_password_prompt') %></p>
<% form_tag :action => 'update_password' do %>
<table width="440px">
<tr>
<td><label for="updateuser_password">New password:</label></td>
<td><label for="updateuser_password"><%= t('users.new_password_label') %>:</label></td>
<td><%= password_field "updateuser", "password", :size => 40 %></td>
</tr>
<tr>
<td><label for="updateuser_password_confirmation">Confirm password:</label></td>
<td><label for="updateuser_password_confirmation"><%= t('users.password_confirmation_label') %>:</label></td>
<td><%= password_field "updateuser", "password_confirmation", :size => 40 %></td>
</tr>
<tr>
<td><%= link_to 'Cancel', preferences_path %></td>
<td><%= submit_tag 'Change password' %></td>
<td><%= link_to t('common.cancel'), preferences_path %></td>
<td><%= submit_tag t('users.change_password_submit') %></td>
</tr>
</table>
<% end %>

View file

@ -1,7 +1,7 @@
if @saved
page["user-#{@deleted_user.id}"].remove
page['user_count'].replace_html @total_users.to_s
page.notify :notice, "User #{@deleted_user.login} was successfully destroyed", 2.0
page.notify :notice, t('users.destroy_successful', :login => @deleted_user.login), 2.0
else
page.notify :error, "There was an error deleting the user #{@deleted_user.login}", 8.0
page.notify :error, t('users.destroy_error', :login => @deleted_user.login), 8.0
end

View file

@ -1,23 +1,23 @@
<h1>Manage users</h1>
<h1><%= t('users.manage_users') %></h1>
<p>You have a total of <span id="user_count"><%= @total_users %></span> users</p>
<p><%= t('users.total_users_count', :count => "<span id=\"user_count\">#{@total_users}</span>") %></p>
<table class="users_table">
<tr>
<th>Login</th>
<th>Full name</th>
<th>Authorization type</th>
<th>Open ID URL</th>
<th>Total actions</th>
<th>Total contexts</th>
<th>Total projects</th>
<th>Total notes</th>
<th><%= User.human_attribute_name('login') %></th>
<th><%= User.human_attribute_name('display_name') %></th>
<th><%= User.human_attribute_name('auth_type') %></th>
<th><%= User.human_attribute_name('open_id_url') %></th>
<th><%= t('users.total_actions') %></th>
<th><%= t('users.total_contexts') %></th>
<th><%= t('users.total_projects') %></th>
<th><%= t('users.total_notes') %></th>
<th>&nbsp;</th>
</tr>
<% for user in @users %>
<tr <%= "class=\"highlight\"" if user.is_admin? %> id="user-<%= user.id %>">
<td><%=h user.login %></td>
<td><%=h user.last_name? ? user.display_name : '-' %></td>
<td><%=h user.display_name %></td>
<td><%= h user.auth_type %></td>
<td><%= h user.open_id_url || '-' %></td>
<td><%= h user.todos.size %></td>
@ -25,9 +25,9 @@
<td><%= h user.projects.size %></td>
<td><%= h user.notes.size %></td>
<td><%= !user.is_admin? ? link_to_remote(
image_tag("blank.png", :title =>"Destroy user", :class=>"delete_item"),
image_tag("blank.png", :title =>t('users.destroy_user'), :class=>"delete_item"),
{ :url => user_path(user.id), :method => :delete,
:confirm => "Warning: this will delete user \'#{user.login}\', all their actions, contexts, project and notes. Are you sure that you want to continue?" },
:confirm => t('users.destroy_confirmation', :login => user.login) },
{ :class => "icon" } ) : "&nbsp;" %></td>
</tr>
<% end %>
@ -36,4 +36,4 @@
<%= will_paginate @users %>
</p>
<p><%= link_to 'Signup new user', signup_path %></p>
<p><%= link_to t('users.signup_new_user'), signup_path %></p>

View file

@ -1,4 +1,4 @@
<div title="Account signup" id="signupform" class="form">
<div title="<%= t('users.account_signup') %>" id="signupform" class="form">
<% form_tag :action=> "create" do %>
<%= error_messages_for 'user' %><br/>
@ -10,7 +10,7 @@
<table>
<%if Tracks::Config.auth_schemes.include?('cas') && session[:cas_user]%>
<tr>
<td><label for="user_login">With your CAS username:</label></td>
<td><label for="user_login"><%= t('users.register_with_cas') %>:</label></td>
<td> "<%= session[:cas_user]%>" </td>
<td>
<%= hidden_field "user", "login", :value => session[:cas_user] %>
@ -20,25 +20,25 @@
</tr>
<%else%>
<tr>
<td><label for="user_login">Desired login:</label></td>
<td><label for="user_login"><%= t('users.desired_login') %>:</label></td>
<td> <%= text_field "user", "login", :size => 20 %></td>
</tr>
<tr>
<td><label for="user_password">Choose password:</label></td>
<td><label for="user_password"><%= t('users.choose_password') %>:</label></td>
<td><%= password_field "user", "password", :size => 20 %></td>
</tr>
<tr>
<td><label for="user_password_confirmation">Confirm password:</label></td>
<td><label for="user_password_confirmation"><%= t('users.confirm_password') %>:</label></td>
<td><%= password_field "user", "password_confirmation", :size => 20 %></td>
</tr>
<tr>
<td><label for="user_auth_type">Authentication Type:</label></td>
<td><label for="user_auth_type"><%= User.human_attribute_name('auth_type') %>:</label></td>
<td><%= select("user", "auth_type", @auth_types, { :include_blank => false })%></td>
</tr>
<%end%>
<tr>
<td></td>
<td><input type="submit" id="signup" value="Signup &#187;" class="primary" /></td>
<td><input type="submit" id="signup" value="<%= t('users.signup') %> &#187;" class="primary" /></td>
</tr>
</table>

View file

@ -0,0 +1,5 @@
<div title="No signups" id="signupform" class="form">
<h3>Benutzerregistrierung deaktiviert</h3>
<p>Dieser Server erlaubt keine freie Benutzerregistrierung.</p>
<p>Bitte wenden Sie sich <%= mail_to "#{@admin_email}", "via E-mail", :encode => "hex" %> an den Administrator, um ein Konto zu erhalten.</p>
</div>

445
config/locales/en.yml Normal file
View file

@ -0,0 +1,445 @@
en:
activerecord:
errors:
models:
project:
name:
blank: "project must have a name"
too_long: "project name must be less than 256 characters"
taken: "already exists"
invalid: "cannot contain the comma (',') character"
attributes:
user:
first_name: "First name"
last_name: "Last name"
todo:
predecessors: "Depends on"
preference:
week_starts: "Week starts on"
show_project_on_todo_done: "Go to project page on todo complete"
refresh: "Refresh interval (in minutes)"
mobile_todos_per_page: "Actions per page (Mobile View)"
sms_email: "From email"
sms_context: "Default email context"
models:
project:
feed_title: "Tracks Projects"
feed_description: "Lists all the projects for {{username}}"
preference:
due_styles: ['Due in ___ days', 'Due on _______']
user:
error_context_not_associated: "Context id {{context}} not associated with user id {{user}}."
error_project_not_associated: "Project id {{project}} not associated with user id {{user}}."
todo:
error_date_must_be_future: "must be a date in the future"
common:
update: "Update"
logout: "Logout"
cancel: "Cancel"
server_error: "An error occurred on the server."
contexts: "Contexts"
numbered_step: "Step {{number}}"
errors_with_fields: "There were problems with the following fields:"
back: "Back"
create: "Create"
go_back: "Go back"
search: "Search"
contexts:
status_hidden: "Context is hidden"
status_active: "Context is active"
no_actions: "Currently there are no incomplete actions in this context"
context_name: "Context name"
update_status_message: "Name of context was changed"
save_status_message: "Context saved"
last_completed_in_context: "in this context (last {{number}})"
add_context: "Add Context"
context_hide: "Hide from front page?"
hide_form: "Hide form"
visible_contexts: "Visible Contexts"
hidden_contexts: "Hidden Contexts"
context_deleted: "Deleted context '{{name}}'"
no_contexts: "Currently there are no {{state}} contexts"
hide_form_link_title: "Hide new context form"
data:
import_errors: "Some errors occurred during import"
import_successful: "Import was successful."
feedlist:
legend: "Legend:"
rss_feed: "RSS Feed"
plain_text_feed: "Plain Text Feed"
ical_feed: "iCal feed"
notice_incomplete_only: "Note: All feeds show only actions that have not been marked as done."
last_fixed_number: "Last {{number}} actions"
all_actions: "All actions"
actions_due_today: "Actions due today or earlier"
actions_due_next_week: "Actions due in 7 days or earlier"
actions_completed_last_week: "Actions completed in the last 7 days"
all_contexts: "All Contexts"
all_projects: "All Projects"
active_projects_wo_next: "Active projects with no next actions"
active_starred_actions: "All starred, active actions"
projects_and_actions: "Active projects with their actions"
context_centric_actions: "Feeds for incomplete actions in a specific context"
context_needed: "There need to be at least one context before you can request a feed"
choose_context: "Choose the context you want a feed of"
select_feed_for_context: "Select the feed for this context"
project_centric: "Feeds for incomplete actions in a specific project"
project_needed: "There need to be at least one project before you can request a feed"
choose_project: "Choose the project you want a feed of"
select_feed_for_project: "Select the feed for this project"
integrations:
opensearch_description: "Search in Tracks"
applescript_next_action_prompt: "Description of next action:"
applescript_success_before_id: "New next action with id"
applescript_success_after_id: "created"
gmail_description: "Gadget to add Tracks to Gmail as a gadget"
layouts:
toggle_notes: "Toggle notes"
toggle_notes_title: "Toggle all notes"
navigation:
home: "Home"
home_title: "Home"
starred: "Starred"
starred_title: "See your starred actions"
projects: "Projects"
projects_title: "Projects"
tickler: "Tickler"
tickler_title: "Tickler"
organize: "Organize"
contexts: "Contexts"
contexts_title: "Contexts"
notes: "Notes"
notes_title: "Show all notes"
recurring_todos: "Repeating todos"
recurring_todos_title: "Manage recurring actions"
calendar: "Calendar"
completed_tasks: "Done"
completed_tasks_title: "Completed"
feeds: "Feeds"
feeds_title: "See a list of available feeds"
stats: "Statistics"
stats_title: "See your statistics"
view: "View"
calendar_title: "Calendar of due actions"
preferences: "Preferences"
preferences_title: "Show my preferences"
export_title: "Import and export data"
export: "Export"
manage_users: "Manage users"
manage_users_title: "Add or delete users"
integrations_: "Integrate Tracks"
api_docs: "REST API Docs"
search: "Search All Items"
next_actions_rss_feed: "RSS feed of next actions"
mobile_navigation:
new_action: "0-New action"
home: "1-Home"
contexts: "2-Contexts"
projects: "3-Projects"
starred: "4-Starred"
logout: "Logout"
tickler: "Tickler"
feeds: "Feeds"
login:
successful: "Logged in successfully. Welcome back!"
unsuccessful: "Login unsuccessful."
log_in_again: "log in again."
session_time_out: "Session has timed out. Please {{link}}"
logged_out: "You have been logged out of Tracks."
session_will_expire: "session will expire after {{hours}} hour(s) of inactivity."
session_will_not_expire: "session will not expire."
successful_with_session_info: "Login successful:"
cas_username_not_found: "Sorry, no user by that CAS username exists ({{username}})"
openid_identity_url_not_found: "Sorry, no user by that identity URL exists ({{identity_url}})"
account_login: "Account login"
please_login: "Please log in to use Tracks"
user_no_expiry: "Stay logged in"
sign_in: "Sign in"
cas_logged_in_greeting: "Hello, {{username}}! You are authenticated."
cas_no_user_found: "Hello, {{username}}! You do not have an account on Tracks."
cas_create_account: "If you like to request on please go here to {{signup_link}}"
cas_signup_link: "Request Account"
cas_login: "CAS Login"
login_with_openid: "login with an OpenId"
login_standard: "go back to the standard login"
login_cas: "go to the CAS"
option_separator: "or,"
mobile_use_openid: "...or login with an Open ID"
notes:
note_location_link: "In:"
note_header: "Note {{id}}"
note_link_title: "Show note {{id}}"
delete_note_title: "Delete this note"
delete_confirmation: "Are you sure that you want to delete the note \'{{id}}\'?"
edit_item_title: "Edit item"
show_note_title: "Show note"
deleted_note: "Deleted note '{{id}}'"
no_notes_available: "Currently there are no notes: add notes to projects from individual project pages."
preferences:
title: "Your preferences"
show_number_completed: "Show {{number}} completed items"
staleness_starts_after: "Staleness starts after {{days}} days"
sms_context_none: "None"
edit_preferences: "Edit preferences"
token_header: "Your token"
token_description: "Token (for feeds and API use)"
generate_new_token: "Generate a new token"
generate_new_token_confirm: "Are you sure? Generating a new token will replace the existing one and break any external usages of this token."
authentication_header: "Your authentication"
current_authentication_type: "Your authentication type is {{auth_type}}"
change_authentication_type: "Change your authentication type"
change_password: "Change your password"
open_id_url: "Your Open ID URL is"
change_identity_url: "Change Your Identity URL"
projects:
status_project_name_changed: "Name of project was changed"
default_tags_removed_notice: "Removed the default tags"
set_default_tags_notice: "Set project's default tags to {{default_tags}}"
default_context_removed: "Removed default context"
default_context_set: "Set project's default context to {{default_context}}"
project_saved_status: "Project saved"
no_notes_attached: "Currently there are no notes attached to this project"
add_note: "Add a note"
todos_append: "in this project"
add_note_submit: "Add note"
deferred_actions: "Deferred actions for this project"
deferred_actions_empty: "There are no deferred actions for this project"
completed_actions: "Completed actions for this project"
completed_actions_empty: "There are no completed actions for this project"
notes: "Notes"
notes_empty: "There are no notes for this project"
settings: "Settings"
state: "This project is {{state}}"
active_projects: "Active projects"
hidden_projects: "Hidden projects"
completed_projects: "Completed projects"
search:
no_results: "Your search yielded no results."
todos_matching_query: "Todos matching query"
projects_matching_query: "Projects matching query"
notes_matching_query: "Notes matching query"
contexts_matching_query: "Contexts matching query"
tags_matching_query: "Tags matching query"
shared:
hide_action_form_title: "Hide new action form"
hide_form: "Hide form"
toggle_multi_title: "Toggle single/multi new action form"
toggle_multi: "Add multiple next actions"
separate_tags_with_commas: "separate with commas"
add_action: "Add action"
multiple_next_actions: "Multiple next actions (one on each line)"
project_for_all_actions: "Project for all actions"
context_for_all_actions: "Context for all actions"
tags_for_all_actions: "Tags for all actions (sep. with commas)"
add_actions: "Add actions"
sidebar:
list_empty: "None"
list_name_active_projects: "Active Projects"
list_name_active_contexts: "Active Contexts"
list_name_hidden_projects: "Hidden Projects"
list_name_completed_projects: "Completed Projects"
list_name_hidden_contexts: "Hidden Contexts"
stats:
tod30_legend:
time_of_day: "Time of Day"
number_of_actions: "Number of actions"
tod30: "Time of day (last 30 days)"
no_actions_selected: "There are no actions selected."
totals: "Totals"
actions: "Actions"
contexts: "Contexts"
projects: "Projects"
tags: "Tags"
more_stats_will_appear: "More statistics will appear here once you have added some actions."
spread_of_actions_for_all_context: "Spread of actions for all context"
spread_of_running_actions_for_visible_contexts: "Spread of running actions for visible contexts"
current_running_time_of_incomplete_visible_actions: "Current running time of incomplete visible actions"
running_time_legend:
actions: "Actions"
percentage: "Percentage"
weeks: "Running time of an action (weeks). Click on a bar for more info"
time_of_day: "Time of day (all actions)"
time_of_day_legend:
number_of_actions: "Number of actions"
time_of_day: "Time of Day"
labels:
created: "Created"
completed: "Completed"
avg_created: "Avg Created"
avg_completed: "Avg Completed"
month_avg_created: "{{months}} Month Avg Created"
month_avg_completed: "{{months}} Month Avg Completed"
click_to_update_actions: "Click on a bar in the chart to update the actions below."
click_to_return: "Click {{here}} to return to the statistics page."
click_to_return_link: "here"
click_to_show_actions_from_week: "Click {{link}} to show the actions from week {{week}} and further."
running_time_all: "Current running time of all incomplete actions"
running_time_all_legend:
actions: "Actions"
percentage: "Percentage"
running_time: "Running time of an action (weeks). Click on a bar for more info"
actions_last_year: "Actions in the last years"
actions_last_year_legend:
number_of_actions: "Number of actions"
months_ago: "Months ago"
other_actions_label: "(others)"
action_selection_title: "TRACKS::Action selection"
actions_selected_from_week: "Actions selected from week"
actions_further: "and further"
totals_project_count: "You have {{count}} projects."
totals_active_project_count: "Of those {{count}} are active projects"
totals_hidden_project_count: "{{count}} are hidden"
totals_completed_project_count: "and {{count}} are completed projects."
totals_context_count: "You have {{count}} contexts."
totals_visible_context_count: "Of those {{count}} are visible contexts"
totals_hidden_context_count: "and {{count}} are hidden contexts."
totals_first_action: "Since your first action on {{date}}"
totals_action_count: "you have a total of {{count}} actions"
totals_actions_completed: "{{count}} of these are completed."
totals_incomplete_actions: "You have {{count}} incomplete actions"
totals_deferred_actions: "of which {{count}} are deferred actions in the tickler"
totals_blocked_actions: "{{count}} are dependent on the completion of their actions."
totals_tag_count: "You have {{count}} tags placed on actions."
totals_unique_tags: "Of those tags, {{count}} are unique."
actions_avg_completion_time: "Of all your completed actions, the average time to complete is {{count}} days."
actions_min_max_completion_days: "The Max-/minimum days to complete is {{min}}/{{max}}."
actions_min_completion_time: "The minimum time to complete is {{time}}."
actions_actions_avg_created_30days: "In the last 30 days you created on average {{count}} actions"
actions_avg_completed_30days: "and completed an average of {{count}} actions per day."
actions_avg_created: "In the last 12 months you created on average {{count}} actions"
actions_avg_completed: "and completed an average of {{count}} actions per month."
tag_cloud_title: "Tag Cloud for all actions"
tag_cloud_description: "This tag cloud includes tags of all actions (completed, not completed, visible and/or hidden)"
no_tags_available: "no tags available"
tag_cloud_90days_title: "Tag Cloud actions in past 90 days"
tag_cloud_90days_description: "This tag cloud includes tags of actions that were created or completed in the past 90 days."
top10_projects: "Top 10 projects"
top10_projects_30days: "Top 10 project in past 30 days"
top10_longrunning: "Top 10 longest running projects"
top5_contexts: "Top 5 Contexts"
top5_visible_contexts_with_incomplete_actions: "Top 5 Visible Contexts with incomplete actions"
actions_30days_title: "Actions in the last 30 days"
actions_lastyear_title: "Actions in the last 12 months"
legend:
number_of_actions: "Number of actions"
months_ago: "Months ago"
number_of_days: "Number of days ago"
day_of_week: "Day of week"
actions: "Actions"
percentage: "Percentage"
running_time: "Running time of an action (weeks)"
actions_day_of_week_title: "Day of week (all actions)"
actions_dow_30days_title: "Day of week (past 30 days)"
action_completion_time_title: "Completion time (all completed actions)"
todos:
action_saved: "Action saved"
recurring_action_saved: "Recurring action saved"
action_saved_to_tickler: "Action saved to tickler"
added_new_project: "Added new project"
added_new_context: "Added new context"
recurrence_completed: "There is no next action after the recurring action you just finished. The recurrence is completed"
tagged_with: "tagged with &lsquo;{{tag_name}}&rsquo;"
no_actions_found: "No actions found"
no_actions_with: "Currently there are no incomplete actions with the tag '{{tag_name}}'"
removed_predecessor: "Removed {{successor}} as dependency from {{predecessor}}."
error_removing_dependency: "There was an error removing the dependency"
deferred_actions_with: "Deferred actions with the tag '{{tag_name}}'"
no_deferred_actions_with: "No deferred actions with the tag '{{tag_name}}'"
completed_actions_with: "Completed actions with the tag {{tag_name}}"
no_completed_actions_with: "No completed actions with the tag '{{tag_name}}'"
next_action_description: "Next action description"
notes: "Notes"
new_related_todo_created: "A new todo was added which belongs to this recurring todo"
error_completing_todo: "There was an error completing / activating the recurring todo {{description}}"
recurring_todos: "Recurring todos"
no_recurring_todos: "Currently there are no recurring todos"
completed_recurring: "Completed recurring todos"
no_completed_recurring: "Currently there are no completed recurring todos"
add_new_recurring: "Add a new recurring action"
recurring_deleted_success: "The recurring action was deleted succesfully."
error_deleting_recurring: "There was an error deleting the recurring todo {{description}}"
recurrence_period: "Recurrence period"
recurrence:
daily: "Daily"
weekly: "Weekly"
monthly: "Monthly"
yearly: "Yearly"
starts_on: "Starts on"
ends_on: "Ends on"
no_end_date: "No end date"
ends_on_number_times: "Ends after {{number}} times"
ends_on_date: "Ends on {{date}}"
daily_options: "Settings for daily recurring actions"
daily_every_number_day: "Every {{number}} day(s)"
every_work_day: "Every work day"
weekly_options: "Settings for weekly recurring actions"
weekly_every_number_week: "Returns every {{number}} week on"
monthly_options: "Settings for monthly recurring actions"
day_x_on_every_x_month: "Day {{day}} on every {{month}} month"
monthly_every_xth_day: "The {{day}} {{day_of_week}} of every {{month}} month"
yearly_options: "Settings for yearly recurring actions"
yearly_every_x_day: "Every {{month}} {{day}}"
yearly_every_xth_day: "The {{day}} {{day_of_week}} of {{month}}"
recurrence_on_options: "Set recurrence on"
recurrence_on_due_date: "the date that the todo is due"
show_options: "Show the todo"
show_option_always: "always"
show_days_before: "{{days}} days before the todo is due"
from_tickler: "the date todo comes from tickler (no due date set)"
delete_recurring_action: "delete the recurring action '{{description}}'"
star_action_with_description: "star the action '{{description}}'"
star_action: "Star this action"
delete_action: "Delete action"
edit_action: "Edit action"
edit_action_with_description: "Edit the action '{{description}}'"
confirm_delete: "Are you sure that you want to delete the action '{{description}}'?"
delete: "Delete"
edit: "Edit"
defer_date_after_due_date: "Defer date is after due date. Please edit and adjust due date before deferring."
convert_to_project: "Make project"
blocked_by: "Blocked by {{predecessors}"
depends_on: "Depends on"
pending: "Pending"
drag_action_title: "Drag onto another action to make it depend on that action"
action_due_on: "(action due on {{date}})"
scheduled_overdue: "Scheduled to show {{days}} days ago"
show_today: "Show Today"
show_tomorrow: "Show Tomorrow"
show_on_date: "Show on {{date}}"
show_in_days: "Show in {{days}} days"
defer_x_days:
one: "Defer one day"
other: "Defer {{count}} days"
has_x_pending:
one: "Has one pending action"
other: "Has {{count}} pending actions"
recurring_actions_title: "TRACKS::Recurring Actions"
users:
change_authentication_type: "Change authentication type"
select_authentication_type: "Select your new authentication type and click 'Change Authentication Type' to replace your current settings."
label_auth_type: "Authentication type"
identity_url: "Identity URL"
auth_change_submit: "Change Authentication Type"
change_password_prompt: "Enter your new password in the fields below and click 'Change Password' to replace your current password with your new one."
new_password_label: "New password"
password_confirmation_label: "Confirm password"
change_password_submit: "Change password"
destroy_successful: "User {{login}} was successfully destroyed"
destroy_error: "There was an error deleting the user {{login}}"
total_actions: "Total actions"
total_contexts: "Total contexts"
total_projects: "Total projects"
total_notes: "Total notes"
destroy_user: "Destroy user"
destroy_confirmation: "Warning: this will delete user \'{{login}}\', all their actions, contexts, project and notes. Are you sure that you want to continue?"
signup_new_user: "Signup new user"
manage_users: "Manage users"
total_users_count: "You have a total of {{count}} users"
account_signup: "Account signup"
register_with_cas: "With your CAS username"
desired_login: "Desired login"
choose_password: "Choose password"
confirm_password: "Confirm password"
signup: "Signup"
errors:
user_unauthorized: "Only administrative users are allowed access to this function."

View file

@ -49,7 +49,7 @@ module LoginSystem
set_current_user(user)
current_user.remember_me
cookies[:auth_token] = { :value => current_user.remember_token , :expires => current_user.remember_token_expires_at, :secure => SITE_CONFIG['secure_cookies'] }
flash[:notice] = "Logged in successfully. Welcome back!"
flash[:notice] = t('login.successful')
end
end
@ -191,7 +191,7 @@ module LoginSystem
def basic_auth_denied
response.headers["Status"] = "401 Unauthorized"
response.headers["WWW-Authenticate"] = "Basic realm=\"'Tracks Login Required'\""
render :text => "401 Unauthorized: You are not authorized to interact with Tracks.", :status => 401
render :text => t('login.unsuccessful'), :status => 401
end
end

View file

@ -1,70 +0,0 @@
<html>
<head>
<title>Rails: Welcome on board</title>
<style>
body { background-color: #fff; color: #333; }
body, p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 12px;
line-height: 18px;
}
li {
margin-bottom: 7px;
}
pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
a { color: #000; }
a:visited { color: #666; }
a:hover { color: #fff; background-color:#000; }
</style>
</head>
<body>
<h1>Congratulations, you've put Ruby on Rails!</h1>
<p><b>Before you move on</b>, verify that the following conditions have been met:</p>
<ol>
<li>The log directory and the empty log files must be writable to the web server (<code>chmod -R 777 log</code>).
<li>
The shebang line in the public/dispatch* files must reference your Ruby installation. <br/>
You might need to change it to <code>#!/usr/bin/env ruby</code> or point directly at the installation.
</li>
<li>
Rails on Apache needs to have the cgi handler and mod_rewrite enabled. <br/>
Somewhere in your httpd.conf, you should have:<br/>
<code>AddHandler cgi-script .cgi</code><br/>
<code>LoadModule rewrite_module libexec/httpd/mod_rewrite.so</code><br/>
<code>AddModule mod_rewrite.c</code>
</li>
</ol>
<p>Take the following steps to get started:</p>
<ol>
<li>Create empty development and test databases for your application.<br/>
<small>Recommendation: Use *_development and *_test names, such as basecamp_development and basecamp_test</small><br/>
<small>Warning: Don't point your test database at your development database, it'll destroy the latter on test runs!</small>
<li>Edit config/database.yml with your database settings.
<li>Create controllers and models using the generator in <code>script/generate</code> <br/>
<small>Help: Run the generator with no arguments for documentation</small>
<li>See all the tests run by running <code>rake</code>.
<li>Develop your Rails application!
<li>Setup Apache with <a href="http://www.fastcgi.com">FastCGI</a> (and <a href="http://raa.ruby-lang.org/list.rhtml?name=fcgi">Ruby bindings</a>), if you need better performance
</ol>
<p>
Having problems getting up and running? First try debugging it yourself by looking at the log files. <br/>
Then try the friendly Rails community <a href="http://www.rubyonrails.org">on the web</a> or <a href="http://www.rubyonrails.org/show/IRC">on IRC</a>
(<a href="irc://irc.freenode.net/#rubyonrails">FreeNode#rubyonrails</a>).
</p>
</body>
</html>