small fixes

removed beispiel show action
beautified search url
anchors for faqs fixed
This commit is contained in:
Andreas Stephanides
2014-03-29 14:05:33 +01:00
parent 5134e25b81
commit ddb230604c
9 changed files with 19 additions and 33 deletions

View File

@@ -16,11 +16,7 @@ class BeispieleController < ApplicationController
def show
# @lva = params([:lva]) unless params([:lva]).nil?
@beispiel = Beispiel.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @beispiel }
end
redirect_to @beispiel.lva
end
# GET /beispiele/new

View File

@@ -16,7 +16,7 @@ class ThemenController < ApplicationController
# GET /themen/1.json
def show
@thema = Thema.find(params[:id])
redirect_to :controller=>'themengruppen', :id=>@thema.themengruppe.id, :action=>:show, :anchor=> params[:id].to_s
redirect_to :controller=>'themengruppen', :id=>@thema.themengruppe.id, :action=>:show, :anchor=> "thema_"+params[:id].to_s
@fragen=@thema.fragen
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>"Verwalten", :path=>verwalten_thema_path(@thema)}]

View File

@@ -1,18 +0,0 @@
<p id="notice"><%= notice %></p>
<p>
<b>Name:</b>
<%= @beispiel.name %>
</p>
<p>
<b>Desc:</b>
<%= @beispiel.desc %>
<%= @beispiel.beispieldatei.url %>
</p>
<p>
<%= @beispiel.lva.name %>
</p>
<%= link_to 'Edit', edit_beispiel_path(@beispiel) %> |
<%= link_to 'Back', beispiele_path %>

View File

@@ -13,7 +13,7 @@
<% unless @gremium.thema.nil? %>
<p>
<%= link_to thema_path(@gremium.thema) do%>
<%= fa_icon "book 2x" %> Mehr über <%=@gremium.fall4 %> erfahren
<%= fa_icon "book 2x border" %> Mehr über <%=@gremium.fall4 %> erfahren
<% end %>
</p>
<% end %>

View File

@@ -1,6 +1,6 @@
<div class="content-wrap content-column">
<%= semantic_form_for :search,:remote=>true, :url=>search_home_index_path, :html=>{:id=>"search_form", :method=>'get'} do |f| %>
<%= f.input :query, :input_html => { :name => 'query' } , :label=>false %>
<%= semantic_form_for :search,:remote=>true, :url=>search_home_index_path, :html=>{:id=>"search_form",:class=>"navbar-search", :method=>'get'} do |f| %>
<%= f.input :query, :input_html => { :name => 'query' } , :label=>false, :class=>"search-query" %>
<% end %>
<script>
$( document ).ready(function() {

View File

@@ -21,7 +21,8 @@
</div>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<%= f.action :submit, :as => :button, :label=>"Sdf"+raw(fa_icon("save"))%>
<%= f.action :cancel, :as => :link %>
<% end %>
<% end %><% end %>

View File

@@ -1,3 +1,8 @@
<a name="thema_<%=small.id%>" href="#<%=small.id%>">
<h2><%= small.title %></h2>
</a>
<%= raw(small.text) %>
<br/>
<%= raw("<b>FAQs:</b>") unless small.fragen.empty? %>

View File

@@ -1,9 +1,9 @@
<% @themengruppen.each do |tg| %>
<h2><%= tg.title%></h2>
<a name="themengruppe_<%=tg.id.to_s%>">
<h2><%= tg.title%></h2></a>
<ul>
<% tg.themen.order(:priority).reverse.each do |t| %>
<li><a name="themengruppe_<%=t.id.to_s%>"> <%= t.title %> &nbsp;</a>
<li><%= t.title %>

View File

@@ -2,7 +2,7 @@
themes_for_rails
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
resources :home, :only=>[:index] do
get :search, :on=>:collection
end
#get 'home',:controller=>home,:action=>:index,:as=>"home_index"
scope '(:locale)/admin' do
@@ -103,7 +103,9 @@
# get 'rubriken/verwalten',:controller=>:rubriken,:action=>:alle_verwalten, :as=>'rubriken_verwalten'
resources :home, :only=>[:index] do
get :search, :on=>:collection
collection do
get 'dev'
get 'startdev'
get 'linksnotimplemented'