Merge branch 'master' of https://github.com/fetsite/fetsite
This commit is contained in:
@@ -31,7 +31,7 @@ class Meeting < ActiveRecord::Base
|
||||
end
|
||||
t= t+ self.name.to_s
|
||||
# t = t + " " + I18n.l(self.calentry.start) unless self.calentry.nil?
|
||||
t = t +" am "+ self.calentry.text unless self.calentry.nil?
|
||||
t = t +" "+ I18n.t("date.on")+" "+ self.calentry.text unless self.calentry.nil?
|
||||
t
|
||||
end
|
||||
def create_announcement(user)
|
||||
|
||||
@@ -115,16 +115,16 @@ class Neuigkeit < ActiveRecord::Base
|
||||
self.has_calentries?
|
||||
end
|
||||
def relevant_calentry
|
||||
self.calentries.min_by{|c| c.days_to_today * 2 * ((c.is_past?)? 2:1)}
|
||||
self.calentries.min_by{|c| c.days_to_today * 1.3 * ((c.is_past?)? 2:1)}
|
||||
end
|
||||
def update_cache
|
||||
if self.has_meeting? && !self.meeting.calentry.nil?
|
||||
self.update_column(:cache_order, (self.meeting.calentry.start.to_date - Date.today).to_i.abs * 2)
|
||||
self.update_column(:cache_order, (self.meeting.calentry.start.to_date - Date.today).to_i.abs * 1.3)
|
||||
self.update_column(:cache_relevant_date, self.meeting.calentry.start.to_date)
|
||||
else
|
||||
if self.is_event?
|
||||
c = self.calentries.min_by{|c| c.days_to_today * 2 * ((c.is_past?)? 2:1)}
|
||||
self.update_column(:cache_order, c.days_to_today * 2 * ((c.is_past?)? 2:1))
|
||||
c = self.calentries.min_by{|c| c.days_to_today * 1.3 * ((c.is_past?)? 2:1)}
|
||||
self.update_column(:cache_order, c.days_to_today * 1.3 * ((c.is_past?)? 2:1))
|
||||
self.update_column(:cache_relevant_date, (c.is_past?) ? c.ende.to_date : c.start.to_date)
|
||||
else
|
||||
unless self.datum.nil?
|
||||
|
||||
@@ -56,10 +56,6 @@
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span10 offset1" id="contentdiv">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.dropdown-toggle').click(function(e) {
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
<%= display_meta_tags %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% cache("rubriken_tabs_" + @rubriken.max{|r| r.updated_at.to_i}.updated_at.to_i.to_s + can?(:verwalten, Rubrik).to_s) do %>
|
||||
<%= render 'tabs' %>
|
||||
<% end %>
|
||||
<%= render 'layouts/pretty_toolbar', :object=> @toolbar_elements %>
|
||||
<p id="notice"><%= notice %></p>
|
||||
<div class="content-wrap content-column">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<ul>
|
||||
<% t.fragen.order(:title).each do |f| %>
|
||||
<li>
|
||||
<b> <%= f.title %>?</b>
|
||||
<b> <%= f.title %></b>
|
||||
<p> <%= raw(f.text) %></p>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
de:
|
||||
date:
|
||||
on: am
|
||||
abbr_day_names:
|
||||
- So
|
||||
- Mo
|
||||
|
||||
20
config/locales/date.en.yml
Normal file
20
config/locales/date.en.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
en:
|
||||
date:
|
||||
formats:
|
||||
default: ! '%d/%m/%Y'
|
||||
default-picker: ! 'dd/mm/yyyy'
|
||||
long: ! '%e. %B %Y'
|
||||
short: ! '%e. %b'
|
||||
order:
|
||||
- :day
|
||||
- :month
|
||||
- :year
|
||||
on: on
|
||||
time:
|
||||
am: am
|
||||
formats:
|
||||
default: ! '%d/%m/%Y, %H:%M h'
|
||||
long: ! '%A, %d. %B %Y, %H:%M h'
|
||||
short: ! '%d/%m/%Y, %H:%M h'
|
||||
timeonly: ! '%H:%M Uhr'
|
||||
pm: pm
|
||||
Reference in New Issue
Block a user