From 0272f812daf187e8fa8fb297d08f3e4cdc636e7d Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Tue, 4 Aug 2009 09:54:45 +0200 Subject: [PATCH] Add the ability to integrate your tracks installation as a Gmail Gadget. Code was contributed by GTDify.com. Thanks! see http://www.getontracks.org/forums/viewthread/434/ --- app/controllers/integrations_controller.rb | 4 + app/views/integrations/index.html.erb | 176 ++++++++++++--------- app/views/layouts/standard.html.erb | 2 +- public/stylesheets/standard.css | 13 +- 4 files changed, 117 insertions(+), 78 deletions(-) diff --git a/app/controllers/integrations_controller.rb b/app/controllers/integrations_controller.rb index 26f5f99d..ebf6a78c 100644 --- a/app/controllers/integrations_controller.rb +++ b/app/controllers/integrations_controller.rb @@ -32,4 +32,8 @@ class IntegrationsController < ApplicationController render :layout => false end + def google_gadget + render :layout => false, :content_type => Mime::XML + end + end diff --git a/app/views/integrations/index.html.erb b/app/views/integrations/index.html.erb index be2a5a0c..9d468228 100644 --- a/app/views/integrations/index.html.erb +++ b/app/views/integrations/index.html.erb @@ -1,27 +1,22 @@ <% has_contexts = !current_user.contexts.empty? -%>

Integrations

-

Tracks can be integrated with a number of other tools... whatever it takes to help you get things done! This page has information on setting up some of these. Not all of these are applicable to all platforms, and some require more technical knowledge than others. See also <%= link_to "developer documentation for Tracks' REST API", url_for(:action => 'rest_api') %>.

-

Contents: -

    +

    Tracks can be integrated with a number of other tools... + whatever it takes to help you get things done! + This page has information on setting up some of these. + Not all of these are applicable to all platforms, and some require more + technical knowledge than others. + See also <%= link_to "developer documentation for Tracks' REST API", url_for(:action => 'rest_api') %>.

    +

    Contents:

    +

-

-

Do you have one of your own to add? Tell us about it in our Tips and Tricks forum - and we may include it on this page in a future versions of Tracks.

- - -

Integrated email/SMS receiver

-

-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: -

-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. +
  • Integrate Tracks with an email server to be able to send an action through email to Tracks
  • +
    +

    Do you have one of your own to add? + Tell us about + it in our Tips and Tricks forum and we may include it on this page in a future versions of Tracks.

    @@ -29,22 +24,22 @@ You can also use the Rich Todo API to send in tasks like "do laundry @ Home" or

    This is a simple script that pops up a dialog box asking for a description, and then sends that to Tracks with a hard-coded context.

    <% if has_contexts -%> -
      -
    1. Choose the context you want to add actions to: - <%= observe_field "applescript1-contexts", :update => "applescript1", - :with => 'context_id', - :url => { :controller => "integrations", :action => "get_applescript1" }, - :before => "$('applescript1').startWaiting()", - :complete => "$('applescript1').stopWaiting()" - %> -
    2. -
    3. Copy the Applescript below to the clipboard.
      - - -
    4. -
    5. Open Script Editor and paste the script into a new document.
    6. -
    7. Compile and save the script. Run it as necessary.
    8. -
    +
      +
    1. Choose the context you want to add actions to: + <%= observe_field "applescript1-contexts", :update => "applescript1", + :with => 'context_id', + :url => { :controller => "integrations", :action => "get_applescript1" }, + :before => "$('applescript1').startWaiting()", + :complete => "$('applescript1').stopWaiting()" + %> +
    2. +
    3. Copy the Applescript below to the clipboard.
      + + +
    4. +
    5. Open Script Editor and paste the script into a new document.
    6. +
    7. Compile and save the script. Run it as necessary.
    8. +
    <% else %>

    You do not have any context yet. The script will be available after you add your first context

    <% end %> @@ -54,23 +49,23 @@ You can also use the Rich Todo API to send in tasks like "do laundry @ Home" or

    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.

    <% if has_contexts -%> -
      -
    1. Choose the context you want to add actions to: - <%= observe_field "applescript2-contexts", :update => "applescript2", - :with => 'context_id', - :url => { :controller => "integrations", :action => "get_applescript2" }, - :before => "$('applescript2').startWaiting()", - :complete => "$('applescript2').stopWaiting()" - %> -
    2. -
    3. Copy the Applescript below to the clipboard.
      - - -
    4. -
    5. Open Script Editor and paste the script into a new document.
    6. -
    7. Compile and save the script to the ~/Library/Scriipts/Mail Scripts directory.
    8. -
    9. For more information on using AppleScript with Mail.app, see this overview. -
    +
      +
    1. Choose the context you want to add actions to: + <%= observe_field "applescript2-contexts", :update => "applescript2", + :with => 'context_id', + :url => { :controller => "integrations", :action => "get_applescript2" }, + :before => "$('applescript2').startWaiting()", + :complete => "$('applescript2').stopWaiting()" + %> +
    2. +
    3. Copy the Applescript below to the clipboard.
      + + +
    4. +
    5. Open Script Editor and paste the script into a new document.
    6. +
    7. Compile and save the script to the ~/Library/Scriipts/Mail Scripts directory.
    8. +
    9. For more information on using AppleScript with Mail.app, see this overview. +
    <% else %>

    You do not have any context yet. The script will be available after you add your first context

    <% end %> @@ -81,28 +76,28 @@ You can also use the Rich Todo API to send in tasks like "do laundry @ Home" or

    This integration will allow you to add actions to Tracks via Quicksilver.

    <% if has_contexts -%> -
      -
    1. Choose the context you want to add actions to: - <%= observe_field "quicksilver-contexts", :update => "quicksilver", - :with => 'context_id', - :url => { :controller => "integrations", :action => "get_quicksilver_applescript" }, - :before => "$('quicksilver').startWaiting()", - :complete => "$('quicksilver').stopWaiting()" - %> -
    2. -
    3. Copy the Applescript below to the clipboard.
      - - -
    4. -
    5. Open Script Editor and paste the script into a new document.
    6. -
    7. Compile and save the script as "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ (you may need to create the Actions directory)
    8. -
    9. Restart Quicksilver
    10. -
    11. Activate Quicksilver (Ctrl+Space by default)
    12. -
    13. Press "." to put quicksilver into text mode
    14. -
    15. Type the description of the next action you want to add
    16. -
    17. Press tab to switch to the action pane.
    18. -
    19. By typing or scrolling, choose the "Add to Tracks" action.
    20. -
    +
      +
    1. Choose the context you want to add actions to: + <%= observe_field "quicksilver-contexts", :update => "quicksilver", + :with => 'context_id', + :url => { :controller => "integrations", :action => "get_quicksilver_applescript" }, + :before => "$('quicksilver').startWaiting()", + :complete => "$('quicksilver').stopWaiting()" + %> +
    2. +
    3. Copy the Applescript below to the clipboard.
      + + +
    4. +
    5. Open Script Editor and paste the script into a new document.
    6. +
    7. Compile and save the script as "Add to Tracks.scpt" in ~/Library/Application Support/Quicksilver/Actions/ (you may need to create the Actions directory)
    8. +
    9. Restart Quicksilver
    10. +
    11. Activate Quicksilver (Ctrl+Space by default)
    12. +
    13. Press "." to put quicksilver into text mode
    14. +
    15. Type the description of the next action you want to add
    16. +
    17. Press tab to switch to the action pane.
    18. +
    19. By typing or scrolling, choose the "Add to Tracks" action.
    20. +
    <% else %>

    You do not have any context yet. The script will be available after you add your first context

    <% end %> @@ -115,3 +110,38 @@ You can also use the Rich Todo API to send in tasks like "do laundry @ Home" or

    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?

    + + +

    Integrated email/SMS receiver

    +

    + 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: +

    +

    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. +

    + + +

    Add Tracks as a Google Gmail gadget

    +

    + 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: +

    + + + + + + + \ No newline at end of file diff --git a/app/views/layouts/standard.html.erb b/app/views/layouts/standard.html.erb index 651691e7..4057d367 100644 --- a/app/views/layouts/standard.html.erb +++ b/app/views/layouts/standard.html.erb @@ -81,7 +81,7 @@ <%= render_flash %> -
    +
    <% unless @controller_name == 'feed' or session['noexpiry'] == "on" -%> <%= periodically_call_remote( :url => {:controller => "login", :action => "check_expiry"}, :frequency => (5*60)) %> diff --git a/public/stylesheets/standard.css b/public/stylesheets/standard.css index 60e9b496..218be620 100644 --- a/public/stylesheets/standard.css +++ b/public/stylesheets/standard.css @@ -1217,21 +1217,26 @@ button.positive, .widgets a.positive{ margin-top:15px; margin-bottom:15px; } -body.integrations h2 { +div.integrations h2 { margin-top:40px; padding-top:20px; margin-bottom:10px; border-top:1px solid #ccc; } -body.integrations p, body.integrations li { +div.integrations p, div.integrations li { font-size:1.0em; } -body.integrations li { + +div.integrations pre { + font-size:1.1em; +} + +div.integrations li { list-style-type: disc; list-style-position: inside; margin-left:30px; } -body.integrations textarea { +div.integrations textarea { margin:10px; padding:3px; width:80%;