mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-01 14:58:50 +01:00
Merge pull request #120 from maddentim/fixes
Creating new todo link for context headers in mobile interface
This commit is contained in:
commit
f228067e0b
2 changed files with 8 additions and 1 deletions
|
|
@ -149,6 +149,10 @@ span.prj, span.ctx{
|
|||
background: #FFC2C2;
|
||||
}
|
||||
|
||||
.ctx-add {
|
||||
float: right;
|
||||
}
|
||||
|
||||
ul.c li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
<%
|
||||
new_context_todo_params = {:format => :m}
|
||||
new_context_todo_params[:from_context] = context.id
|
||||
|
||||
# select actions from this context
|
||||
@not_done = @not_done_todos.select {|t| t.context_id == context.id }
|
||||
|
||||
if not @not_done.empty?
|
||||
# only show a context when there are actions in it
|
||||
-%>
|
||||
<h2><%= link_to context.name, context_path(context, :format => 'm') %></h2>
|
||||
<h2><%= link_to context.name, context_path(context, :format => 'm') %><span class="ctx-add"><%= link_to t('+'), new_todo_path(new_context_todo_params) %></span></h2>
|
||||
<ul class="c">
|
||||
<%= render :partial => "todos/todo",
|
||||
:collection => @not_done,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue