This commit is contained in:
2014-10-28 16:54:13 +01:00
11 changed files with 46 additions and 7 deletions

View File

@@ -173,3 +173,11 @@ span.linklist a {
float:left;
}
form.inline div {
float:left;}
form.inline input {
}
form.inline {
float:clear; }

View File

@@ -37,6 +37,11 @@ class CalendarsController < ApplicationController
# GET /calendars/1/edit
def edit
@calendar = Calendar.find(params[:id])
respond_to do |format|
format.html # new.html.erb
format.js
end
end
# POST /calendars

View File

@@ -39,6 +39,7 @@ class CalentriesController < ApplicationController
@calentry = Calentry.find(params[:id])
respond_to do |format|
format.html
format.js
end
end
@@ -67,9 +68,11 @@ class CalentriesController < ApplicationController
if @calentry.update_attributes(params[:calentry])
format.html { redirect_to @calentry, notice: 'Calentry was successfully updated.' }
format.json { head :no_content }
format.js
else
format.html { render action: "edit" }
format.json { render json: @calentry.errors, status: :unprocessable_entity }
format.js { render action: "edit"}
end
end
end

View File

@@ -9,5 +9,5 @@ format =:default
end%>
<%= calentry.text %>
<%= link_to "edit", edit_calentry_path(calentry) if can? :edit, calentry %>
<%= link_to "edit", edit_calentry_path(calentry),:remote=>true if can? :edit, calentry %>
</div>

View File

@@ -0,0 +1,10 @@
<%= fa_icon("calendar 2x") %>
<%= semantic_form_for @calentry, :remote=>true, :html=>{:class=>"inline"} do |f| %>
<%= f.input :start, :as => :datetimepicker %>
<%= f.input :dauer , :as => :string, :append=>"h" %>
<%= f.action :submit, :as => :input_ %>
<% end %>

View File

@@ -0,0 +1,2 @@
$("#calentry_<%= @calentry.id %>").html("<%=escape_javascript( render :partial=>"nested_form" ,:object=>@calentry)%>");

View File

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

View File

@@ -1,3 +1,13 @@
<%= content_for :header do %>
<title>Fetsite - <%= @lva.full_name %></title>
<% set_meta_tags :og => {
:url=>lva_path(:theme=>nil) }
%>
<%= display_meta_tags %>
<% end %>
<div class="container-fluid">
<%= render 'studien/tabs'%>
<p id="notice"><%= notice %></p>

View File

@@ -1,2 +1,2 @@
alert("hallo Welt");
$("#themaview").html("<%=escape_javascript( render :action=>:edit, :layout=>false )%>");

View File

@@ -1,5 +1,5 @@
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-Agent: *
# Disallow: /
User-Agent: *
Disallow: /