Check out this card I made for my milestones:

<def tag="card" for="Milestone">
 <card class="milestone" param="default" merge>
    <header:>
      <h4 param="heading"><a><name/></a></h4>
    </header:>
    <body:>
        <div part="milestone-data"  id="milestone-data-#{typed_id}">
            <div class="#{this.status_color}">
                Due: <this.target-date/><br/>
                  <if test="&this.completion_date">
                      Completed by <name with="&this.completer"/> on 
<this.completion-date/><br/>
                  </if>
                <a if="&this.assigned_user" 
with="&this.assigned_user">Belongs to: <name /></a><br/>
                Group: <a if="&this.assigned_group" 
with="&this.assigned_group"><name/></a>
                <if test="&this.assigned_group">
                    <if test="&this.completion_date == nil && 
(current_user.groups.find_by_name(this.assigned_group.name) || 
this.assigned_user == current_user)">
                        <update-button fields="&{:completion_date => 
Date.today(), :completer_id => current_user.id}" 
update="milestone-data-#{typed_id}" label="mark done" confirm="are you 
sure?"/>
                    </if>
                </if>
                <else>
                    <if test="&this.completion_date == nil && 
(this.assigned_user == current_user)">
                        <update-button fields="&{:completion_date => 
Date.today(), :completer_id => current_user.id}" 
update="milestone-data-#{typed_id}" label="mark done" confirm="are you 
sure?"/>
                    </if>
                </else>
            </div>
        </div>
    </body>
  </card>
</def>

sorry about the nested ifs, it was necessary I swear! but that should 
elucidate things a bit for ya :D


-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to