From bcc6de5349734f743c2867fec716ed92a2de9de1 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 16 Feb 2013 11:02:47 +0100 Subject: [PATCH] =?UTF-8?q?Config=20Controller=20f=C3=BCr=20Administration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 13 ++++++++----- app/controllers/config_controller.rb | 6 ++++++ app/views/config/index.html.erb | 7 +++++++ app/views/layouts/menu.html.erb | 1 + app/views/users/index.html.erb | 12 +++++++++--- config/routes.rb | 5 +---- 6 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 app/controllers/config_controller.rb create mode 100644 app/views/config/index.html.erb diff --git a/Gemfile b/Gemfile index 8cd4db2..d30f98f 100644 --- a/Gemfile +++ b/Gemfile @@ -5,19 +5,18 @@ gem 'rails', '3.2.9' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'sqlite3' -gem 'execjs', '~>1.4.0' + gem 'sqlite3' + gem 'execjs', '~>1.4.0' # Gems used only for assets and not required # in production environments by default. group :assets do - gem 'sass-rails', '~> 3.2.3' + gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'bootstrap-sass','~> 2.2.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes - gem 'therubyracer', :platforms => :ruby - + gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' end @@ -39,9 +38,11 @@ gem 'jquery-rails' # To use debugger # gem 'debugger' + # Formbuilder for easier form generation gem 'formtastic', '~>2.2.1' gem 'formtastic-bootstrap' +# TinyMCE gem "tinymce-rails" , '>=3.5.8' # Internationalisierung @@ -61,4 +62,6 @@ gem "cancan" # Fileupload gem 'paperclip' ,'~>3.4.0' + +# Git gem 'git' \ No newline at end of file diff --git a/app/controllers/config_controller.rb b/app/controllers/config_controller.rb new file mode 100644 index 0000000..9edaab2 --- /dev/null +++ b/app/controllers/config_controller.rb @@ -0,0 +1,6 @@ +class ConfigController < ApplicationController + def index + + end + +end \ No newline at end of file diff --git a/app/views/config/index.html.erb b/app/views/config/index.html.erb new file mode 100644 index 0000000..576558a --- /dev/null +++ b/app/views/config/index.html.erb @@ -0,0 +1,7 @@ +

Admin Panel

+ + diff --git a/app/views/layouts/menu.html.erb b/app/views/layouts/menu.html.erb index ac89b3e..49d5077 100644 --- a/app/views/layouts/menu.html.erb +++ b/app/views/layouts/menu.html.erb @@ -22,3 +22,4 @@ <% elsif I18n.locale == :de %> <%= link_to "English" ,switch_locale_url(:en)%> <%end %> +<%= link_to 'Admin',:controller =>"config",:action => "index" %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index d06fe69..97507bc 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,8 +1,14 @@ + <% @users.each do |user|%> - - + + diff --git a/config/routes.rb b/config/routes.rb index 6b8a20e..c5b1a20 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,6 +8,7 @@ Fetsite::Application.routes.draw do devise_for :users scope '(:locale)/admin' do resources :users +get 'config',:controller=>:config,:action=>:index end @@ -27,11 +28,7 @@ end resources :neuigkeiten resources :rubriken - - put 'rubriken/(:id)/addmoderator',:controller=>:rubriken,:action=>:addmoderator - - resources :home
- <%= user.email %>
    +
NameE-MailRollen
+ <%= user.email %>
    <% user.roles.each do |role| %>
  • <%= role.name%>
  • <% end %>