meetings added, documents added

This commit is contained in:
Andreas Stephanides
2014-11-26 20:36:04 +01:00
parent c2ea1782ff
commit 87dd70ea44
32 changed files with 304 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
<% data_ext = attachment.datei.file.extension.downcase %>
<% data_ext = attachment.datei.file.try(:extension).try(:downcase) %>
<% if (!["jpg","png","jpeg"].find_index(data_ext).nil?) %>

View File

@@ -1,8 +1,8 @@
<div class="contentbox" id="document_<%= document.id%>">
<% image_tag("/iconnavy/time.png") %>
<% fa_icon("calendar 2x") %>
<%= fa_icon("file-text 2x") %>
<%= document.title %>
<%= document.name %>
<%= 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>

View File

@@ -1,15 +1,9 @@
<%= fa_icon("calendar 2x") %>
<p id="notice"><%= notice %></p>
<%= semantic_form_for @calentry, :remote=>true, :html=>{:class=>"inline"} do |f| %>
<%= semantic_form_for @document, :remote=>true, :html=>{:class=>""} do |f| %>
<%= f.input :start, :as => :datetimepicker %>
<%= f.input :dauer , :as => :string, :append=>"h" %>
<%= f.input :object_id , :as => :hidden %>
<%= f.input :object_type , :as => :hidden %>
<%= f.input :typ , :as => :hidden %>
<%= f.action :submit, :as => :input_ %>
<%= f.input :name %>
<%= f.action :submit, :as => :input_ %>
<% end %>

View File

@@ -0,0 +1,8 @@
<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 %>
<%= render meeting.agenda unless meeting.agenda.nil? %>
<%= render meeting.protocol unless meeting.protocol.nil? %>
</div>

View File

@@ -0,0 +1 @@
$("#meeting_<%= @meeting.id %>").replaceWith("<%=escape_javascript( render :partial=>"meeting", :object=>@meeting)%>");

View File

@@ -8,8 +8,8 @@
<% if small.isdraft %>
<div class="sticker sticker-yellow"><%= I18n.t("thema.isdraft") %> </div>
<% end %>
<%= raw(small.text) %>
<% end %><div>
<%= raw(small.text) %></div>
<br/>
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>
@@ -20,6 +20,23 @@
<%= raw(frage.text) %>
</p>
<% end %>
<% unless small.meetings.empty? %>
<b>Treffen/Sitzungen</b>
<% small.meetings.each do |m| %>
<%= render m %>
<% end%>
<% end%>
<% unless small.documents.empty? %>
<b>Dokumente</b>
<% small.documents.each do |d| %>
<%= render d %>
<% end%>
<% end%>
<% unless small.hideattachment %>
<%= render partial: "themen/attachment_list", object: small.attachments, locals:{editor: false} unless small.attachments.empty? %>
<% end %>