You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by as...@apache.org on 2008/05/23 04:56:37 UTC
svn commit: r659388 - in /ode/sandbox/singleshot: app/helpers/task_helper.rb
app/views/tasks/index.atom.builder app/views/tasks/index.html.erb
app/views/tasks/show.html.erb public/stylesheets/default.css
Author: assaf
Date: Thu May 22 19:56:37 2008
New Revision: 659388
URL: http://svn.apache.org/viewvc?rev=659388&view=rev
Log:
quick_actions instead of task_actions, and limited to claim/manage.
Modified:
ode/sandbox/singleshot/app/helpers/task_helper.rb
ode/sandbox/singleshot/app/views/tasks/index.atom.builder
ode/sandbox/singleshot/app/views/tasks/index.html.erb
ode/sandbox/singleshot/app/views/tasks/show.html.erb
ode/sandbox/singleshot/public/stylesheets/default.css
Modified: ode/sandbox/singleshot/app/helpers/task_helper.rb
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/helpers/task_helper.rb?rev=659388&r1=659387&r2=659388&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/helpers/task_helper.rb (original)
+++ ode/sandbox/singleshot/app/helpers/task_helper.rb Thu May 22 19:56:37 2008
@@ -1,12 +1,9 @@
module TaskHelper
- def task_actions(task)
- manage = task.admin?(authenticated)
- cancel = task.can_cancel?(authenticated)
- claim = task.can_claim?(authenticated)
- actions = [
- manage && button_to('Manage', edit_task_url(task), :method=>:get, :title=>'Managed this task', :disabled=>!manage),
- claim && button_to('Claim', task_owner_url(task, 'owner'=>authenticated.identity), :method=>:put, :title=>'Claim task', :disabled=>!claim),
+ def quick_actions(task)
+ [ task.admin?(authenticated) && button_to('Manage', edit_task_url(task), :method=>:get, :title=>'Manage this task'),
+ task.can_claim?(authenticated) && button_to('Claim', task_owner_url(task, 'owner'=>authenticated.identity),
+ :method=>:put, :title=>'Claim task')
].select { |action| action }.join(' ')
end
Modified: ode/sandbox/singleshot/app/views/tasks/index.atom.builder
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/index.atom.builder?rev=659388&r1=659387&r2=659388&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/tasks/index.atom.builder (original)
+++ ode/sandbox/singleshot/app/views/tasks/index.atom.builder Thu May 22 19:56:37 2008
@@ -8,7 +8,7 @@
entry.content :type=>'html' do |content|
content.text! sanitize(simple_format(task.description))
content.text! "<p><em>#{task_vitals(task)}</em></p>"
- content.text! "<div>#{task_actions(task)}</div>"
+ content.text! "<div>#{quick_actions(task)}</div>"
end
end
end
Modified: ode/sandbox/singleshot/app/views/tasks/index.html.erb
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/index.html.erb?rev=659388&r1=659387&r2=659388&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/tasks/index.html.erb (original)
+++ ode/sandbox/singleshot/app/views/tasks/index.html.erb Thu May 22 19:56:37 2008
@@ -2,7 +2,7 @@
<ol class='tasks hfeed'>
<% @tasks.each do |task| %>
<% content_tag_for 'li', task, :class=>'hentry' do %>
- <div class='actions'><%= task_actions(task) %></div>
+ <div class='actions'><%= quick_actions(task) %></div>
<h3 class='entry-title priority_<%= task.priority %> <%= 'overdue' if task.over_due? %>'>
<%= link_to h(task.title), task_url(task), :rel=>'bookmark', :title=>'View/perform task' %></h3>
<div class='entry-content'>
Modified: ode/sandbox/singleshot/app/views/tasks/show.html.erb
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/show.html.erb?rev=659388&r1=659387&r2=659388&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/tasks/show.html.erb (original)
+++ ode/sandbox/singleshot/app/views/tasks/show.html.erb Thu May 22 19:56:37 2008
@@ -4,7 +4,7 @@
<div class='summary'>
<h1><%= link_to 'Singleshot', root_url %></h1>
<div class='vitals'><%= task_vitals(@task) %></div>
- <div class='actions'><%= task_actions(@task) %> <%= link_to_function 'More Options', "Singleshot.expand(event, '.expanded', 'Less options')", :class=>'button-to' %></div>
+ <div class='actions'><%= quick_actions(@task) %> <%= content_tag 'button', 'More Options', :onclick=>"Singleshot.expand(event, '.expanded', 'Less options')", :class=>'button-to' %></div>
</div>
<div class='expanded' style='display:none'>
<%= link_to image_tag('calendar.png') + ' Calendar', formatted_task_url(@task, 'ics', :access_key=>authenticated.access_key),
@@ -35,7 +35,7 @@
</dl>
<div class='actions'>
<%= button_to 'Some action' %>
- <%= task_actions(@task) %>
+ <%= quick_actions(@task) %>
</div>
</div>
</div>
Modified: ode/sandbox/singleshot/public/stylesheets/default.css
URL: http://svn.apache.org/viewvc/ode/sandbox/singleshot/public/stylesheets/default.css?rev=659388&r1=659387&r2=659388&view=diff
==============================================================================
--- ode/sandbox/singleshot/public/stylesheets/default.css (original)
+++ ode/sandbox/singleshot/public/stylesheets/default.css Thu May 22 19:56:37 2008
@@ -16,8 +16,6 @@
/** Forms and controls **/
-/** Form controls **/
-
input[type=text], input[type=password], select {
padding: 0.3em;
border: 1px solid #ccc;