taskwarrior-web 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +6 -0
- data/lib/taskwarrior-web/app.rb +3 -3
- data/lib/taskwarrior-web/task.rb +1 -1
- data/lib/taskwarrior-web/version.rb +1 -1
- data/public/css/styles.css +5 -3
- data/views/listing.erb +2 -0
- data/views/project.erb +2 -0
- data/views/projects.erb +3 -0
- metadata +3 -2
data/CHANGELOG.md
ADDED
data/lib/taskwarrior-web/app.rb
CHANGED
@@ -78,7 +78,7 @@ module TaskwarriorWeb
|
|
78
78
|
pass unless ['pending', 'completed', 'deleted'].include?(params[:status])
|
79
79
|
@title = "#{params[:status].capitalize} Tasks"
|
80
80
|
@subnav = subnav('tasks')
|
81
|
-
@tasks = TaskwarriorWeb::Task.find_by_status(params[:status]).sort_by! { |x| [x.due.nil?.to_s, x.due.to_s, x.project.to_s] }
|
81
|
+
@tasks = TaskwarriorWeb::Task.find_by_status(params[:status]).sort_by! { |x| [x.priority.nil?.to_s, x.priority.to_s, x.due.nil?.to_s, x.due.to_s, x.project.to_s] }
|
82
82
|
erb :listing
|
83
83
|
end
|
84
84
|
|
@@ -119,14 +119,14 @@ module TaskwarriorWeb
|
|
119
119
|
get '/projects/overview/?' do
|
120
120
|
@title = 'Projects'
|
121
121
|
@subnav = subnav('projects')
|
122
|
-
@tasks = TaskwarriorWeb::Task.query('status.not' => 'deleted', 'project.not' => '').group_by { |x| x.project.to_s }
|
122
|
+
@tasks = TaskwarriorWeb::Task.query('status.not' => 'deleted', 'project.not' => '').sort_by! { |x| [x.priority.nil?.to_s, x.priority.to_s, x.due.nil?.to_s, x.due.to_s] }.group_by { |x| x.project.to_s }
|
123
123
|
erb :projects
|
124
124
|
end
|
125
125
|
|
126
126
|
get '/projects/:name/?' do
|
127
127
|
@subnav = subnav('projects')
|
128
128
|
subbed = params[:name].gsub('--', '.')
|
129
|
-
@tasks = TaskwarriorWeb::Task.query('status.not' => 'deleted', 'project' => subbed).sort_by! { |x| [x.due.nil?.to_s, x.due.to_s] }
|
129
|
+
@tasks = TaskwarriorWeb::Task.query('status.not' => 'deleted', 'project' => subbed).sort_by! { |x| [x.priority.nil?.to_s, x.priority.to_s, x.due.nil?.to_s, x.due.to_s] }
|
130
130
|
regex = Regexp.new("^#{subbed}$", Regexp::IGNORECASE)
|
131
131
|
@title = @tasks.select { |t| t.project.match(regex) }.first.project
|
132
132
|
erb :project
|
data/lib/taskwarrior-web/task.rb
CHANGED
@@ -7,7 +7,7 @@ module TaskwarriorWeb
|
|
7
7
|
|
8
8
|
TASK_BIN = 'task'
|
9
9
|
|
10
|
-
attr_accessor :id, :entry, :project, :uuid, :description, :status, :due, :start, :end, :tags
|
10
|
+
attr_accessor :id, :entry, :project, :priority, :uuid, :description, :status, :due, :start, :end, :tags
|
11
11
|
|
12
12
|
####################################
|
13
13
|
# MODEL METHODS FOR INDIVIDUAL TASKS
|
data/public/css/styles.css
CHANGED
@@ -251,12 +251,14 @@ a#task-add { float: right; margin: 20px 0; }
|
|
251
251
|
#listing table tr.deleted { }
|
252
252
|
|
253
253
|
#listing .project-container { margin-bottom: 10px; }
|
254
|
+
h3.project {
|
255
|
+
float: left;
|
256
|
+
width: auto;
|
257
|
+
margin-bottom: 10px;
|
258
|
+
}
|
254
259
|
h3.project a {
|
255
260
|
color: #000;
|
256
261
|
text-decoration: none;
|
257
|
-
width: auto;
|
258
|
-
float: left;
|
259
|
-
margin-bottom: 10px;
|
260
262
|
background: url(/images/arrow_right_grey.png) no-repeat right center;
|
261
263
|
padding-right: 20px;
|
262
264
|
}
|
data/views/listing.erb
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
<th>Project</th>
|
8
8
|
<th>Due</th>
|
9
9
|
<th>Tags</th>
|
10
|
+
<th>Priority</th>
|
10
11
|
</tr>
|
11
12
|
</thead>
|
12
13
|
<tbody>
|
@@ -22,6 +23,7 @@
|
|
22
23
|
<td><a href="/projects/<%= linkify(task.project, :project) %>"><%= task.project %></a></td>
|
23
24
|
<td><%= format_date(task.due) unless task.due.nil? %></td>
|
24
25
|
<td><%= task.tags.join(', ') unless task.tags.nil? %></td>
|
26
|
+
<td><%= task.priority unless task.priority.nil? %></td>
|
25
27
|
</tr>
|
26
28
|
<% end %>
|
27
29
|
</tbody>
|
data/views/project.erb
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
<th>Description</th>
|
8
8
|
<th>Due</th>
|
9
9
|
<th>Tags</th>
|
10
|
+
<th>Priority</th>
|
10
11
|
</tr>
|
11
12
|
</thead>
|
12
13
|
<tbody>
|
@@ -17,6 +18,7 @@
|
|
17
18
|
<td><%= task.description %></td>
|
18
19
|
<td><%= format_date(task.due) unless task.due.nil? %></td>
|
19
20
|
<td><%= task.tags.join(', ') unless task.tags.nil? %></td>
|
21
|
+
<td><%= task.priority unless task.priority.nil? %></td>
|
20
22
|
</tr>
|
21
23
|
<% end %>
|
22
24
|
<% end %>
|
data/views/projects.erb
CHANGED
@@ -9,12 +9,14 @@
|
|
9
9
|
<div class="doneness-container">
|
10
10
|
<div class="doneness-measure" style="width: <%= doneness.to_i * 2 %>px;"><%= doneness.to_i %>%</div>
|
11
11
|
</div>
|
12
|
+
<div class="clearer"></div>
|
12
13
|
<table>
|
13
14
|
<thead>
|
14
15
|
<tr>
|
15
16
|
<th>Description</th>
|
16
17
|
<th>Due</th>
|
17
18
|
<th>Tags</th>
|
19
|
+
<th>Priority</th>
|
18
20
|
</tr>
|
19
21
|
</thead>
|
20
22
|
<tbody>
|
@@ -24,6 +26,7 @@
|
|
24
26
|
<td><%= task.description %></td>
|
25
27
|
<td><%= format_date(task.due) unless task.due.nil? %></td>
|
26
28
|
<td><%= task.tags.join(', ') unless task.tags.nil? %></td>
|
29
|
+
<td><%= task.priority unless task.priority.nil? %></td>
|
27
30
|
</tr>
|
28
31
|
<% end %>
|
29
32
|
<% end %>
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: taskwarrior-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jake Bell
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-09 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sinatra
|
@@ -56,6 +56,7 @@ extra_rdoc_files: []
|
|
56
56
|
|
57
57
|
files:
|
58
58
|
- .gitignore
|
59
|
+
- CHANGELOG.md
|
59
60
|
- Gemfile
|
60
61
|
- README.md
|
61
62
|
- Rakefile
|