Permalink
Browse files

Invite templet miss bug fixed.

  • Loading branch information...
huacnlee committed Oct 9, 2011
1 parent 0b5ba43 commit aa087761442a22943531bc36c7a983a49202f91b
Showing with 27 additions and 13 deletions.
  1. +13 −0 app/cells/ask/_invited_user.html.erb
  2. +1 −13 app/cells/ask/invites.html.erb
  3. +13 −0 app/views/asks/_invited_user.html.erb
@@ -0,0 +1,13 @@
+<% if item.count > 0 %>
+ <div class="invite" title="<%= item.user.name %>" id="ask_invite_<%= item.id %>">
+ <%= user_avatar_tag(item.user,:small) %>
+ <p>
+ <% if @current_user and item.invitor_ids.include?(@current_user.id) %>
+ <a href="#" onclick="return Asks.cancelInviteToAnswer(this,'<%= item.id %>')" class="remove"></a>
+ <% else %>
+ <span class="n"></span>
+ <% end %>
+ <span class="count"><%= item.count %></span>
+ </p>
+ </div>
+<% end %>
@@ -13,19 +13,7 @@
<input type="text" id="ask_to_answer" style="width:200px;" placeholder="搜索人" />
<div id="ask_invited_users" class="clearfix">
<% for item in @invites %>
- <% if item.count > 0 %>
- <div class="invite" title="<%= item.user.name %>" id="ask_invite_<%= item.id %>">
- <%= user_avatar_tag(item.user,:small) %>
- <p>
- <% if @current_user and item.invitor_ids.include?(@current_user.id) %>
- <a href="#" onclick="return Asks.cancelInviteToAnswer(this,'<%= item.id %>')" class="remove"></a>
- <% else %>
- <span class="n"></span>
- <% end %>
- <span class="count"><%= item.count %></span>
- </p>
- </div>
- <% end %>
+ <%= render("invited_user", :item => item) %>
<% end %>
</div>
</div>
@@ -0,0 +1,13 @@
+<% if item.count > 0 %>
+ <div class="invite" title="<%= item.user.name %>" id="ask_invite_<%= item.id %>">
+ <%= user_avatar_tag(item.user,:small) %>
+ <p>
+ <% if current_user and item.invitor_ids.include?(current_user.id) %>
+ <a href="#" onclick="return Asks.cancelInviteToAnswer(this,'<%= item.id %>')" class="remove"></a>
+ <% else %>
+ <span class="n"></span>
+ <% end %>
+ <span class="count"><%= item.count %></span>
+ </p>
+ </div>
+<% end %>

0 comments on commit aa08776

Please sign in to comment.