meeting fixes
This commit is contained in:
@@ -6,9 +6,9 @@ class MeetingsController < ApplicationController
|
||||
unless parent.nil?
|
||||
#authorize! :show, parent
|
||||
if params[:filter]=="upcomming"
|
||||
@meetings=parent.meetings.includes(:calentry).where("calentries.start>?",1.hour.ago)
|
||||
@meetings=parent.meetings.upcomming
|
||||
else
|
||||
@meetings=parent.meetings
|
||||
@meetings=parent.meetings
|
||||
end
|
||||
@parent=parent
|
||||
end
|
||||
|
||||
@@ -92,6 +92,7 @@ class Ability
|
||||
if loggedin
|
||||
end
|
||||
if( user.has_role?("fetuser") || user.has_role?("fetadmin"))
|
||||
|
||||
can :showversions, Neuigkeit
|
||||
can :showintern, Neuigkeit
|
||||
can :showintern, Rubrik
|
||||
|
||||
@@ -10,7 +10,7 @@ class Meeting < ActiveRecord::Base
|
||||
has_one :calentry, as: :object
|
||||
has_one :calendar, :through=>:meetingtyp
|
||||
has_one :rubrik, :through=>:meetingtyp
|
||||
|
||||
scope :upcomming, includes(:calentry).where("calentries.start>?",1.hour.ago)
|
||||
accepts_nested_attributes_for :calentry
|
||||
# validate :agenda, :presence=>true
|
||||
# validate :protocol, :presence=>true
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
format =:default
|
||||
end %>
|
||||
<%= calentry.text %>
|
||||
<% if !(defined? manage) || manage %>
|
||||
<%= link_to "edit", edit_calentry_path(calentry),:remote=>true if can? :edit, calentry %>
|
||||
<%= link_to 'Delete', calentry, method: :delete, data: { confirm: 'Are you sure?' } , remote: true if can? :delete, calentry %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<%= link_to "ankündigen", announce_meeting_path(meeting), remote: true if meeting.neuigkeit.nil? %>
|
||||
<%= link_to "edit", edit_meeting_path(meeting), remote: true %>
|
||||
<%= link_to 'Delete', meeting, method: :delete, data: { confirm: 'Are you sure?' } , remote: true if can? :delete, meeting %>
|
||||
<%= render meeting.calentry unless meeting.calentry.nil? %>
|
||||
<%= render meeting.calentry, locals: {manage: 0} unless meeting.calentry.nil? %>
|
||||
<%= link_to "Agenda" , create_agenda_meeting_path(meeting), :remote=>true if meeting.agenda.nil? %>
|
||||
<%= link_to "Protokoll" , create_protocol_meeting_path(meeting),:remote=>true if meeting.protocol.nil? %>
|
||||
<%= render meeting.agenda unless meeting.agenda.nil? %>
|
||||
|
||||
@@ -27,8 +27,10 @@
|
||||
<b>Treffen/Sitzungen</b>
|
||||
<%= link_to "Neues Meeting", new_meeting_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
|
||||
<div id="<%= Meeting.new_divid_for(small) %>"></div>
|
||||
<%= link_to "All", meetings_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
|
||||
<%= link_to "upcomming", meetings_path(:parent_id=>small.id, :parent_type=>"Thema",:filter=>"upcomming"), :remote=>true %>
|
||||
<ul class="nav nav-tabs">
|
||||
<li><%= link_to "All", meetings_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true if small.meetings.accessible_by(current_ability).count >0 %></li>
|
||||
<li><%= link_to "upcomming", meetings_path(:parent_id=>small.id, :parent_type=>"Thema",:filter=>"upcomming"), :remote=>true if small.meetings.accessible_by(current_ability).upcomming.count >0 %></li>
|
||||
</ul>
|
||||
<%= render :partial=>"meetings/meeting_list", object: small.meetings, locals: {parent: small} %>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
%>
|
||||
|
||||
<%=
|
||||
<%
|
||||
unless @thema.titlepics.first.nil?
|
||||
picture_url=URI(root_url)
|
||||
picture_url.path=@thema.titlepics.first.datei.url(:locale=>nil, :theme=>nil)
|
||||
|
||||
Reference in New Issue
Block a user