forked from bofh/fetsite
meeting views
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span1"></div><div class="span1">
|
||||
<%= fa_icon("calendar 2x") %>
|
||||
|
||||
<div class="span1"></div>
|
||||
<div class="span1">
|
||||
<%= fa_icon("calendar 2x") %>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%= f.input :start, :as => :datetimepicker %></div><div class="span4">
|
||||
<%= f.input :dauer , :as => :string, :append=>"h" %></div><div class="span1">
|
||||
<% f.input :typ %>
|
||||
</div>
|
||||
<div class="span1">
|
||||
<%= f.check_box :_destroy %>
|
||||
<%= I18n.t 'common.delete' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<%= f.input :start, :as => :datetimepicker %></div><div class="span4">
|
||||
<%= f.input :dauer , :as => :string, :append=>"h" %></div><div class="span1">
|
||||
<% f.input :typ %></div> <div class="span1"><%= f.check_box :_destroy %> <%= I18n.t 'common.delete' %></div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<div class="contentbox" id="document_<%= document.id%>">
|
||||
<% image_tag("/iconnavy/time.png") %>
|
||||
<%= fa_icon("file-text 2x") %>
|
||||
|
||||
<%= document.name %>
|
||||
<%= fa_icon("file-text") %>
|
||||
<%= link_to document.name, document %>
|
||||
<%= link_to "edit", edit_document_path(document),:remote=>true if can? :edit, document %>
|
||||
<%= link_to 'Delete', document, method: :delete, data: { confirm: 'Are you sure?' } , remote: true if can? :delete, document %>
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<%= semantic_form_for @document, :remote=>true, :html=>{:class=>""} do |f| %>
|
||||
|
||||
<%= f.input :name %>
|
||||
<%= f.input :parent_id, :as=>:hidden %>
|
||||
<%= f.input :parent_type, :as=>:hidden %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
|
||||
<% end %>
|
||||
|
||||
1
app/views/documents/create.js.erb
Normal file
1
app/views/documents/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#<%= Document.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Document.new_divid_for(@parent)%>\"></div><%=escape_javascript( render :partial=>"document", :object=>@document)%>");
|
||||
6
app/views/documents/edit.html.erb
Executable file
6
app/views/documents/edit.html.erb
Executable file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing Dokument</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @document %> |
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
$("#document_<%= @document.id %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@document)%>");
|
||||
$("#<%= @document.divid %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@document)%>");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
$("#document_new").replaceWith("<div id=\"document_new\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@document) %></div>");
|
||||
$("#<%= Document.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Document.new_divid_for(@parent) %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@document) %></div>");
|
||||
|
||||
|
||||
8
app/views/documents/show.html.erb
Normal file
8
app/views/documents/show.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<h2><%= @document.name %></h2>
|
||||
<%= raw(@document.text) %>
|
||||
<%= semantic_form_for @document, :html=>{:class=>""} do |f| %>
|
||||
<%= f.input :text, :as=>:tinymce_text %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
|
||||
<% end %>
|
||||
<%= tinymce %>
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="contentbox" id="meeting_<%= meeting.id%>">
|
||||
<h3>Meeting: <%= meeting.name %></h3>
|
||||
<%= render meeting.calentry %>
|
||||
<%= link_to "Agenda" , create_agenda_meeting_path(meeting), :remote=>true %>
|
||||
<%= link_to "Protokoll" , create_protocol_meeting_path(meeting),:remote=>true %>
|
||||
<%= 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? %>
|
||||
<%= 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? %>
|
||||
<%= render meeting.protocol unless meeting.protocol.nil? %>
|
||||
</div>
|
||||
|
||||
|
||||
21
app/views/meetings/_nested_form.html.erb
Normal file
21
app/views/meetings/_nested_form.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<%= fa_icon("calendar 2x") %>
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<%= semantic_form_for @meeting, :remote=>true, :html=>{:class=>""} do |f| %>
|
||||
|
||||
<%= f.input :name %>
|
||||
<%= f.semantic_fields_for :calentry, @meeting.calentry do |ff| %>
|
||||
<%= ff.input :start, :as => :datetimepicker %>
|
||||
<%= ff.input :dauer , :as => :string, :append=>"h" %>
|
||||
<%= ff.input :typ %>
|
||||
<% ff.input :object_id %>
|
||||
<% ff.input :object_type %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= f.input :parent_id, :as=>:hidden %>
|
||||
<%= f.input :parent_type, :as=>:hidden %>
|
||||
<%= f.action :submit, :as => :input_ %>
|
||||
|
||||
<% end %>
|
||||
<%= @meeting.calentry.to_yaml %>
|
||||
1
app/views/meetings/create.js.erb
Normal file
1
app/views/meetings/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#<%= Meeting.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Meeting.new_divid_for(@parent)%>\"></div><%=escape_javascript( render :partial=>"meeting", :object=>@meeting)%>");
|
||||
1
app/views/meetings/destroy.js.erb
Normal file
1
app/views/meetings/destroy.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#meeting_<%= @meeting_id %>").remove();
|
||||
5
app/views/meetings/edit.js.erb
Normal file
5
app/views/meetings/edit.js.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
$("#<%= @meeting.divid %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@meeting)%>");
|
||||
|
||||
|
||||
|
||||
|
||||
3
app/views/meetings/new.js.erb
Normal file
3
app/views/meetings/new.js.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
$("#<%= Meeting.new_divid_for(@parent) %>").replaceWith("<div id=\"<%= Meeting.new_divid_for(@parent) %>\"><%=escape_javascript( render :partial=>"nested_form" ,:object=>@meeting) %></div>");
|
||||
|
||||
|
||||
1
app/views/meetings/update.js.erb
Normal file
1
app/views/meetings/update.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("#meeting_<%= @meeting.id %>").replaceWith("<%=escape_javascript( render :partial=>"meeting", :object=>@meeting)%>");
|
||||
@@ -22,6 +22,9 @@
|
||||
<% end %>
|
||||
<% unless small.meetings.empty? %>
|
||||
<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>
|
||||
|
||||
<% small.meetings.each do |m| %>
|
||||
<%= render m %>
|
||||
|
||||
@@ -31,6 +34,8 @@
|
||||
|
||||
<% unless small.documents.empty? %>
|
||||
<b>Dokumente</b>
|
||||
<%= link_to "Neues Dokument", new_document_path(:parent_id=>small.id, :parent_type=>"Thema"), :remote=>true %>
|
||||
<div id="<%= Document.new_divid_for(small) %>"></div>
|
||||
<% small.documents.each do |d| %>
|
||||
<%= render d %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user