merge errors

This commit is contained in:
Andreas Stephanides
2014-12-16 09:23:47 +01:00
parent 881df624b3
commit d26ab277af
4 changed files with 19 additions and 36 deletions

View File

@@ -18,10 +18,9 @@ class DocumentsController < ApplicationController
end end
def edit def edit
@document = Document.find(params[:id]) @document = Document.find(params[:id])
<<<<<<< HEAD
@parent=@document.parent @parent=@document.parent
=======
>>>>>>> origin/documentmeeting
respond_to do |format| respond_to do |format|
format.js format.js
end end
@@ -30,11 +29,9 @@ class DocumentsController < ApplicationController
def create def create
@document = Document.new(params[:document]) @document = Document.new(params[:document])
<<<<<<< HEAD
@parent=@document.parent
=======
>>>>>>> origin/documentmeeting @parent=@document.parent
respond_to do |format| respond_to do |format|
if @document.save if @document.save
# format.html { redirect_to @document, notice: 'Document was successfully created.' } # format.html { redirect_to @document, notice: 'Document was successfully created.' }
@@ -48,15 +45,11 @@ class DocumentsController < ApplicationController
end end
end end
<<<<<<< HEAD
def update def update
@document = Document.find(params[:id]) @document = Document.find(params[:id])
@parent=@document.parent @parent=@document.parent
=======
def update
@document = Document.find(params[:id])
>>>>>>> origin/documentmeeting
respond_to do |format| respond_to do |format|
if @document.update_attributes(params[:document]) if @document.update_attributes(params[:document])
format.html { redirect_to @document, notice: 'Document was successfully updated.' } format.html { redirect_to @document, notice: 'Document was successfully updated.' }
@@ -72,10 +65,9 @@ def update
def destroy def destroy
logger.info("-------------delete------------------") logger.info("-------------delete------------------")
@document = Document.find(params[:id]) @document = Document.find(params[:id])
<<<<<<< HEAD
@parent=@document.parent @parent=@document.parent
=======
>>>>>>> origin/documentmeeting
@document_id = params[:id] @document_id = params[:id]
@document.destroy @document.destroy

View File

@@ -61,7 +61,7 @@ class Meeting < ActiveRecord::Base
self.agenda=d self.agenda=d
end end
end end
<<<<<<< HEAD
def self.new_divid_for(parent) def self.new_divid_for(parent)
"meeting_new_parent_" + parent.class.to_s + "_" + parent.id.to_s "meeting_new_parent_" + parent.class.to_s + "_" + parent.id.to_s
end end
@@ -70,6 +70,5 @@ class Meeting < ActiveRecord::Base
end end
=======
>>>>>>> origin/documentmeeting
end end

View File

@@ -20,7 +20,8 @@
<%= raw(frage.text) %> <%= raw(frage.text) %>
</p> </p>
<% end %> <% end %>
<<<<<<< HEAD
<% if can?(:edit,small) || !small.meetings.empty? %> <% if can?(:edit,small) || !small.meetings.empty? %>
<b>Treffen/Sitzungen</b> <b>Treffen/Sitzungen</b>
<%= link_to "Neues Meeting", new_meeting_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %> <%= link_to "Neues Meeting", new_meeting_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
@@ -29,28 +30,20 @@
<%= link_to "upcomming", meetings_path(:parent_id=>small.id, :parent_type=>"Thema",:filter=>"upcomming"), :remote=>true %> <%= link_to "upcomming", meetings_path(:parent_id=>small.id, :parent_type=>"Thema",:filter=>"upcomming"), :remote=>true %>
<%= render :partial=>"meetings/meeting_list", object: small.meetings, locals: {parent: small} %> <%= render :partial=>"meetings/meeting_list", object: small.meetings, locals: {parent: small} %>
<% end %> <% end %>
<% if can?(:edit,small)|| ! small.documents.empty? %> <% if can?(:edit,small)|| ! small.documents.empty? %>
<b>Dokumente</b> <b>Dokumente</b>
<%= link_to "Neues Dokument", new_document_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %> <%= link_to "Neues Dokument", new_document_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
<div id="<%= Document.new_divid_for(small) %>"></div> <div id="<%= Document.new_divid_for(small) %>"></div>
<% unless small.meetings.empty? %>
<b>Treffen/Sitzungen</b>
<% small.meetings.each do |m| %>
<%= render m %>
<% end%>
<% end%>
<% unless small.documents.empty? %> <% unless small.documents.empty? %>
<b>Dokumente</b>
<% small.documents.each do |d| %> <% small.documents.each do |d| %>
<%= render d %> <%= render d %>
<% end%>
<% end%> <% end%>
<% end%> <% end%>

View File

@@ -166,15 +166,14 @@ Fetsite::Application.routes.draw do
resources :documents resources :documents
resources :meetings do resources :meetings do
member do member do
get :announce get :announce
get :create_protocol get :create_protocol
get :create_agenda get :create_agenda
end end
end
end end
resources :meetingtyps resources :meetingtyps
end end
end end