mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-21 14:44:07 +01:00
get project integrations and login controller tests running
This commit is contained in:
parent
59a4d5ede0
commit
96db48dd86
36 changed files with 179 additions and 223 deletions
|
|
@ -6,13 +6,13 @@ set myUsername to "<%= current_user.login %>"
|
|||
set myToken to "<%= current_user.token %>"
|
||||
set myContextID to <%= context.id %> (* <%= context.name %> *)
|
||||
|
||||
-- Display dialog to enter your description
|
||||
-- Display dialog to enter your description
|
||||
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
|
||||
-- Edit the URL of your Tracks installation if necessary"
|
||||
tell application "<%= home_url %>backend/api"
|
||||
tell application "<%= root_url %>backend/api"
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc}}
|
||||
end tell
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
(*
|
||||
(*
|
||||
Script to grab the sender and subject of the selected
|
||||
Mail message(s), and create new next action(s) with description
|
||||
"Email [sender] about [subject]"
|
||||
|
||||
If you have Growl, it pops a notification up with the id of
|
||||
the newly created action.
|
||||
the newly created action.
|
||||
*)
|
||||
|
||||
(* Edit appropriately for your setup *)
|
||||
|
|
@ -50,25 +50,25 @@ on importMessage(theMessage)
|
|||
|
||||
-- Now send all that info to Tracks
|
||||
-- Edit the URL of your Tracks installation if necessary"
|
||||
tell application "<%= home_url %>backend/api"
|
||||
tell application "<%= root_url %>backend/api"
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc, myNote}}
|
||||
end tell
|
||||
|
||||
(* Growl support - comment out or delete this section if
|
||||
(* Growl support - comment out or delete this section if
|
||||
you don't have Growl *)
|
||||
tell application "GrowlHelperApp"
|
||||
set the allNotificationsList to ¬
|
||||
{"Tracks Notification"}
|
||||
|
||||
-- Make a list of the notifications
|
||||
-- that will be enabled by default.
|
||||
-- Those not enabled by default can be enabled later
|
||||
-- Make a list of the notifications
|
||||
-- that will be enabled by default.
|
||||
-- Those not enabled by default can be enabled later
|
||||
-- in the 'Applications' tab of the growl prefpane.
|
||||
set the enabledNotificationsList to ¬
|
||||
{"Tracks Notification"}
|
||||
|
||||
-- Register our script with growl.
|
||||
-- You can optionally (as here) set a default icon
|
||||
-- You can optionally (as here) set a default icon
|
||||
-- for this script's notifications.
|
||||
register as application ¬
|
||||
"Tracks Applescript" all notifications allNotificationsList ¬
|
||||
|
|
@ -5,7 +5,7 @@ using terms from application "Quicksilver"
|
|||
set myToken to "<%= current_user.token %>"
|
||||
set myContextID to <%= context.id %> (* <%= context.name %> *)
|
||||
|
||||
tell application "<%= home_url %>backend/api"
|
||||
tell application "<%= root_url %>backend/api"
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, ThisClipping}}
|
||||
end tell
|
||||
tell application "Quicksilver"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<Module>
|
||||
<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"/>
|
||||
<Content type="url" href="<%= root_url %>mobile"/>
|
||||
</Module>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
<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>
|
||||
<textarea id="cron" name="cron">0 5 * * * /usr/bin/curl -0 "<%= root_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>
|
||||
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
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:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Go to <%= link_to t('layouts.navigation.preferences'), preferences_url %>
|
||||
<li>Go to <%= link_to t('layouts.navigation.preferences'), preferences_url %>
|
||||
and set your "<%= Preference.human_attribute_name('sms_email') %>" and
|
||||
"<%= Preference.human_attribute_name('sms_context') %>" for todos sent in
|
||||
via email (which could come from an SMS message)</li>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<li><a href="#message_gateway">Integrate Tracks with an email server to be able to send an action through email to Tracks</a></li>
|
||||
<li><a href="#google_gadget">Add Tracks as a Google Gmail gadget</a></li>
|
||||
</ul><br/>
|
||||
<p>Do you have one of your own to add?
|
||||
<p>Do you have one of your own to add?
|
||||
<a href="http://www.getontracks.org/forums/viewforum/10/" title="Tracks | Tips and Tricks">Tell us about
|
||||
it in our Tips and Tricks forum</a> and we may include it on this page in a future versions of Tracks.
|
||||
</p>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
<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>
|
||||
<textarea id="cron" name="cron">0 5 * * * /usr/bin/curl -0 "<%= root_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>
|
||||
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
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:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Go to <%= link_to t('layouts.navigation.preferences'), preferences_url %> and
|
||||
<li>Go to <%= link_to t('layouts.navigation.preferences'), preferences_url %> and
|
||||
set your "<%= Preference.human_attribute_name('sms_email') %>" and
|
||||
"<%= Preference.human_attribute_name('sms_context') %>" for todos sent in
|
||||
via email (which could come from an SMS message)</li>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<a name="applescript2-section"> </a>
|
||||
<h2>Voeg een acties toe met Applescript op basis van de huidig geselecteerde e-mail in Mail.app</h2>
|
||||
<p>Dit script neemt de verstuurder en het onderwerp van de geselecteerde email(s)
|
||||
<p>Dit script neemt de verstuurder en het onderwerp van de geselecteerde email(s)
|
||||
van Mail over en maakt een nieuwe acties voor elke email met de beschrijving
|
||||
"Email [sender] about [subject]". De beschrijving wordt, als nodig, na 100 karakters afgebroken
|
||||
(dit is de limiet voor een beschrijving). Het heeft ook Growl notificaties mocht je Growl geïnstalleerd hebben.</p>
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
<p>Als je de volgende regel toevoegd aan jouw crontab, dat ontvang je een e-mail op elke dag rond 05:00 met een lijst met acties waarvan de deadline afloopt binnen de komende 7 dagen.</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>
|
||||
<textarea id="cron" name="cron">0 5 * * * /usr/bin/curl -0 "<%= root_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>Uiteraard kan je ook een andere <%= link_to 'text feed gebruiken die Tracks biedt', feeds_path %> -- bijvoorbeeld een email met een lijst van acties voor een specifiek project naar een groep collega's die werken aan dat project?</p>
|
||||
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
Als Tracks draait op dezelfde server als jouw mailserver, dan kan je de geïntegreerde mail handler gebruiken van Tracks. Om dit in te stellen:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Ga naar <%= link_to t('layouts.navigation.preferences'), preferences_url %>
|
||||
<li>Ga naar <%= link_to t('layouts.navigation.preferences'), preferences_url %>
|
||||
en stel in "<%= Preference.human_attribute_name('sms_email') %>" en
|
||||
"<%= Preference.human_attribute_name('sms_context') %>" voor acties die
|
||||
verzonden zijn via email (die bijv. komen via een SMS message)</li>
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
<p>
|
||||
Je kan nu ook jouw projects/actions beheren in Gmail met de Tracks Gmail Gadget.
|
||||
Voeg Tracks Gmail gadget toe aan de sidebar van Gmail en volg jouw acties
|
||||
of voeg een nieuwe actie toe zonder apart een nieuw browser tab/scherm te openen
|
||||
of voeg een nieuwe actie toe zonder apart een nieuw browser tab/scherm te openen
|
||||
voor Tracks. Om dit in te stellen:
|
||||
</p>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts.xml
|
||||
<%= root_url %>contexts.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<contexts>...</contexts>
|
||||
</code>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts/51.xml
|
||||
<%= root_url %>contexts/51.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<context>...</context>
|
||||
</code>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts/51/todos.xml
|
||||
<%= root_url %>contexts/51/todos.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<todos type="array">...</todos>
|
||||
</code>
|
||||
|
|
@ -75,7 +75,7 @@ field to <code>ID, created_at, modified_at, completed_at</code> by adding the pa
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>tickler.xml?limit_fields=index
|
||||
<%= root_url %>tickler.xml?limit_fields=index
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
|
@ -89,9 +89,9 @@ field to <code>ID, created_at, modified_at, completed_at</code> by adding the pa
|
|||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
-d "<project><name>Build a treehouse for the kids</name></project>" \
|
||||
<%= home_url %>projects.xml -i
|
||||
<%= root_url %>projects.xml -i
|
||||
>> HTTP/1.1 201 Created
|
||||
Location: <%= home_url %>projects/65.xml
|
||||
Location: <%= root_url %>projects/65.xml
|
||||
...
|
||||
</code>
|
||||
</pre>
|
||||
|
|
@ -102,9 +102,9 @@ Location: <%= home_url %>projects/65.xml
|
|||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
-d "<todo><description>Model treehouse in SketchUp</description><context_id>2</context_id><project_id>65</project_id></todo>" \
|
||||
<%= home_url %>todos.xml -i
|
||||
<%= root_url %>todos.xml -i
|
||||
>> HTTP/1.1 201 Created
|
||||
Location: <%= home_url %>todos/452.xml
|
||||
Location: <%= root_url %>todos/452.xml
|
||||
...
|
||||
</code>
|
||||
</pre>
|
||||
|
|
@ -115,7 +115,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
|
||||
-d "<todo><notes>use maple texture</notes></todos>" \
|
||||
<%= home_url %>todos/452.xml -i
|
||||
<%= root_url %>todos/452.xml -i
|
||||
>> HTTP/1.1 200 OK
|
||||
...
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X PUT \
|
||||
<%= home_url %>todos/452/toggle_check.xml -i
|
||||
<%= root_url %>todos/452/toggle_check.xml -i
|
||||
>> HTTP/1.1 200 OK
|
||||
...
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" -X DELETE \
|
||||
<%= home_url %>todos/452.xml -i
|
||||
<%= root_url %>todos/452.xml -i
|
||||
>> HTTP/1.1 200 OK
|
||||
...
|
||||
</code>
|
||||
|
|
@ -175,7 +175,7 @@ Location: <%= home_url %>todos/452.xml
|
|||
<pre>
|
||||
<code>
|
||||
$ curl -u username:p4ssw0rd -H "Content-Type: text/xml" \
|
||||
<%= home_url %>contexts/2/todos.xml
|
||||
<%= root_url %>contexts/2/todos.xml
|
||||
>> <?xml version="1.0" encoding="UTF-8"?>
|
||||
<nil-classes type="array"/>
|
||||
|
||||
|
|
@ -192,8 +192,8 @@ $ script/console
|
|||
Loading development environment (Rails 1.2.4)
|
||||
>> class Context < ActiveResource::Base; end
|
||||
=> nil
|
||||
>> Context.site = "<%= home_url %>"
|
||||
=> "<%= home_url %>"
|
||||
>> Context.site = "<%= root_url %>"
|
||||
=> "<%= root_url %>"
|
||||
>> Context.site.user = "username"
|
||||
=> "username"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ form_for(note, :html => {
|
|||
:class => "inline-form edit-note-form"}) do |f|
|
||||
-%>
|
||||
|
||||
<div id="error_status"><%= error_messages_for("note") %></div>
|
||||
<div id="error_status"><%= get_list_of_error_messages_for(note) %></div>
|
||||
|
||||
<%= f.hidden_field( "project_id" ) %>
|
||||
<%= f.text_area( "body", "cols" => 70, "rows" => 15, "tabindex" => 1 ) %>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<div id="project_new" class="project_new" style="display:block">
|
||||
<%= form_for(@new_project, :html => {:id => 'project_form',:name=>'project',:class => "inline-form", :method => :post }) do -%>
|
||||
<div id="error_status"><%= error_messages_for("project") %></div>
|
||||
<div id="error_status"><%= get_list_of_error_messages_for(@new_project) %></div>
|
||||
|
||||
<label for="project_name"><%= Project.human_attribute_name(:name) %>:</label><br />
|
||||
<%= text_field 'project', 'name', "tabindex" => next_tab_index %><br />
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
<% end -%>
|
||||
<div id="project_name" style="width: 100%;"><%= project.name -%></div>
|
||||
</h2>
|
||||
<div id="<%= dom_id(project, "container")%>" class="list"><%-# list needs to be here for edit form to work -%>
|
||||
<div id="<%= dom_id(project, "container")%>" class="list">
|
||||
<%= render :partial => "projects/project_settings", :object => project, :locals => { :collapsible => collapsible } %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -18,4 +18,4 @@
|
|||
</div>
|
||||
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "project" } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -7,7 +7,7 @@ project = project_form
|
|||
:class => "inline-form edit-project-form",
|
||||
:method => :put }) do
|
||||
-%>
|
||||
<div id="edit_error_status"><%= error_messages_for("project") %></div>
|
||||
<div id="edit_error_status"><%= get_list_of_error_messages_for(@project) %></div>
|
||||
<%= source_view_tag( @source_view ) -%>
|
||||
|
||||
<label for="project_name">Name:</label><br/>
|
||||
|
|
@ -37,7 +37,7 @@ function update_active_projects_container() {
|
|||
}
|
||||
|
||||
function html_for_error_messages() {
|
||||
return "<%= escape_javascript(error_messages_for('project')) %>";
|
||||
return "<%= escape_javascript(get_list_of_error_messages_for(@project)) %>";
|
||||
}
|
||||
|
||||
function html_for_project_listing() {
|
||||
|
|
|
|||
12
app/views/projects/index.atom.builder
Normal file
12
app/views/projects/index.atom.builder
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
atom_feed do |feed|
|
||||
feed.title(@feed_title)
|
||||
feed.subtitle(@feed_description)
|
||||
feed.updated(@projects.last.updated_at)
|
||||
|
||||
@projects.each do |project|
|
||||
feed.entry(project) do |entry|
|
||||
entry.title(h(project.name))
|
||||
entry.content(project_summary(project), :type => :html)
|
||||
end
|
||||
end
|
||||
end
|
||||
20
app/views/projects/index.rss.builder
Normal file
20
app/views/projects/index.rss.builder
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
xml.instruct! :xml, :version => "1.0"
|
||||
xml.rss :version => "2.0" do
|
||||
xml.channel do
|
||||
xml.title @feed_title
|
||||
xml.description @feed_description
|
||||
xml.link contexts_url
|
||||
xml.language 'en-us'
|
||||
xml.ttl 40
|
||||
|
||||
@projects.each do |project|
|
||||
xml.item do
|
||||
xml.title h(project.name)
|
||||
xml.description project_summary(project)
|
||||
xml.pubDate project.created_at.to_s(:rfc822)
|
||||
xml.link project_url(project)
|
||||
xml.guid project_url(project)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -14,8 +14,7 @@
|
|||
<div class="add_note_link"><%= link_to t('projects.add_note'), '#' %> </div>
|
||||
<h2><%= t('projects.notes') %></h2>
|
||||
<div id="empty-n" style="display:<%= @project.notes.empty? ? 'block' : 'none'%>;">
|
||||
<%= render :partial => "shared/empty",
|
||||
:locals => { :message => t('projects.no_notes_attached')} %>
|
||||
<div class="message"><p><%= t('projects.no_notes_attached') %></p></div>
|
||||
</div>
|
||||
<%= render :partial => "notes/notes_summary", :collection => @project.notes %>
|
||||
</div>
|
||||
|
|
@ -29,5 +28,5 @@
|
|||
|
||||
<div id="input_box">
|
||||
<%= render :partial => "shared/add_new_item_form" %>
|
||||
<%= render :file => "sidebar/sidebar.html.erb" %>
|
||||
<%= render :file => "sidebar/sidebar" %>
|
||||
</div><!-- End of input box -->
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
<div class="message">
|
||||
<p><%= message %></p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue