mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Person.confirmed? isn't private, some schedule fixes
This commit is contained in:
parent
b2f8cfbec3
commit
c2e007e2b8
2 changed files with 16 additions and 16 deletions
|
|
@ -58,6 +58,19 @@ class Person < ActiveRecord::Base
|
|||
Person.where(:user_id => user_id).first
|
||||
end
|
||||
|
||||
def confirmed?
|
||||
if User.exists?(self.user_id)
|
||||
user = User.find(self.user_id)
|
||||
if user.confirmed?
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def biography_limit
|
||||
if !self.biography.nil? && self.biography.split.size > 150
|
||||
|
|
@ -79,17 +92,4 @@ class Person < ActiveRecord::Base
|
|||
self.guid = guid
|
||||
end
|
||||
|
||||
def confirmed?
|
||||
if User.exists?(self.user_id)
|
||||
user = User.find(self.user_id)
|
||||
if user.confirmed?
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
else
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<% while conf_start < conf_end %>
|
||||
|
||||
<tr>
|
||||
<td style="width:10%">
|
||||
<td style="width:5%">
|
||||
<%= conf_start.strftime("%H:%M") %>
|
||||
</td>
|
||||
|
||||
|
|
@ -39,14 +39,14 @@
|
|||
<% if !event.empty? %>
|
||||
<!-- There is an event, calculate the span and show it -->
|
||||
<% span[room.id] = event[0].event_type.length / 15 %>
|
||||
<td style="width:45%" rowspan ="<%= span[room.id] %>">
|
||||
<td rowspan ="<%= span[room.id] %>">
|
||||
<%= event[0].title %><br>
|
||||
</td>
|
||||
<% span[room.id] = span[room.id] + 1 %>
|
||||
<% end %>
|
||||
<% if span[room.id] == 1 %>
|
||||
<!-- span equals 1 show an empty td -->
|
||||
<td style="width:45%"class="empty <%= "room" + "#{room.id}" %>">
|
||||
<td class="empty <%= "room" + "#{room.id}" %>">
|
||||
Empty
|
||||
</td>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue