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

View File

@@ -172,4 +172,12 @@ span.linklist a {
display:block; display:block;
float:left; 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 # GET /calendars/1/edit
def edit def edit
@calendar = Calendar.find(params[:id]) @calendar = Calendar.find(params[:id])
respond_to do |format|
format.html # new.html.erb
format.js
end
end end
# POST /calendars # POST /calendars

View File

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

View File

@@ -9,5 +9,5 @@ format =:default
end%> end%>
<%= calentry.text %> <%= 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> </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"> <div class="container-fluid">
<%= render 'studien/tabs'%> <%= render 'studien/tabs'%>
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>

View File

@@ -14,7 +14,7 @@
<% unless themengruppe.icon.nil? or themengruppe.icon.empty? %> <i class="<%= themengruppe.icon %>" style="font-size:1.5em;margin:0"></i> <% unless themengruppe.icon.nil? or themengruppe.icon.empty? %> <i class="<%= themengruppe.icon %>" style="font-size:1.5em;margin:0"></i>
<% end %> <% end %>
<%=themengruppe.title%> </h3> <%= themengruppe.title%> </h3>
</div> </div>
</div> </div>
@@ -24,7 +24,7 @@
<div class="span6"> <div class="span6">
<p> <p>
<%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT <%= if themengruppe.text.split.size > Themengruppe::WORD_COUNT
themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..." themengruppe.text.split[0..Themengruppe::WORD_COUNT].join(" ") + " ..."
else else
themengruppe.text themengruppe.text

View File

@@ -1,2 +1,2 @@
alert("hallo Welt");
$("#themaview").html("<%=escape_javascript( render :action=>:edit, :layout=>false )%>"); $("#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 # 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: # To ban all spiders from the entire site uncomment the next two lines:
# User-Agent: * User-Agent: *
# Disallow: / Disallow: /