forked from bofh/fetsite
Config Controller für Administration
This commit is contained in:
13
Gemfile
13
Gemfile
@@ -5,19 +5,18 @@ gem 'rails', '3.2.9'
|
|||||||
# Bundle edge Rails instead:
|
# Bundle edge Rails instead:
|
||||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||||
|
|
||||||
gem 'sqlite3'
|
gem 'sqlite3'
|
||||||
gem 'execjs', '~>1.4.0'
|
gem 'execjs', '~>1.4.0'
|
||||||
|
|
||||||
|
|
||||||
# Gems used only for assets and not required
|
# Gems used only for assets and not required
|
||||||
# in production environments by default.
|
# in production environments by default.
|
||||||
group :assets do
|
group :assets do
|
||||||
gem 'sass-rails', '~> 3.2.3'
|
gem 'sass-rails', '~> 3.2.3'
|
||||||
gem 'coffee-rails', '~> 3.2.1'
|
gem 'coffee-rails', '~> 3.2.1'
|
||||||
gem 'bootstrap-sass','~> 2.2.0'
|
gem 'bootstrap-sass','~> 2.2.0'
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
gem 'therubyracer', :platforms => :ruby
|
gem 'therubyracer', :platforms => :ruby
|
||||||
|
|
||||||
gem 'uglifier', '>= 1.0.3'
|
gem 'uglifier', '>= 1.0.3'
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -39,9 +38,11 @@ gem 'jquery-rails'
|
|||||||
# To use debugger
|
# To use debugger
|
||||||
# gem 'debugger'
|
# gem 'debugger'
|
||||||
|
|
||||||
|
|
||||||
# Formbuilder for easier form generation
|
# Formbuilder for easier form generation
|
||||||
gem 'formtastic', '~>2.2.1'
|
gem 'formtastic', '~>2.2.1'
|
||||||
gem 'formtastic-bootstrap'
|
gem 'formtastic-bootstrap'
|
||||||
|
# TinyMCE
|
||||||
gem "tinymce-rails" , '>=3.5.8'
|
gem "tinymce-rails" , '>=3.5.8'
|
||||||
|
|
||||||
# Internationalisierung
|
# Internationalisierung
|
||||||
@@ -61,4 +62,6 @@ gem "cancan"
|
|||||||
|
|
||||||
# Fileupload
|
# Fileupload
|
||||||
gem 'paperclip' ,'~>3.4.0'
|
gem 'paperclip' ,'~>3.4.0'
|
||||||
|
|
||||||
|
# Git
|
||||||
gem 'git'
|
gem 'git'
|
||||||
6
app/controllers/config_controller.rb
Normal file
6
app/controllers/config_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
class ConfigController < ApplicationController
|
||||||
|
def index
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
7
app/views/config/index.html.erb
Normal file
7
app/views/config/index.html.erb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<h1>Admin Panel</h1>
|
||||||
|
<ul class="nav">
|
||||||
|
<li>
|
||||||
|
<%= link_to '<i class="icon-user"></i>'.html_safe + 'Userverwaltung',:controller =>"users",:action => "index" %>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
@@ -22,3 +22,4 @@
|
|||||||
<% elsif I18n.locale == :de %>
|
<% elsif I18n.locale == :de %>
|
||||||
<%= link_to "English" ,switch_locale_url(:en)%>
|
<%= link_to "English" ,switch_locale_url(:en)%>
|
||||||
<%end %>
|
<%end %>
|
||||||
|
<%= link_to 'Admin',:controller =>"config",:action => "index" %>
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
|
<ul class="breadcrumb">
|
||||||
|
<li>
|
||||||
|
<%= link_to "Admin" , :controller =>"config" , :action => "index"%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<% @users.each do |user|%>
|
<% @users.each do |user|%>
|
||||||
<tr>
|
<tr><th>Name</th><th>E-Mail</th><th>Rollen</th>
|
||||||
<th>
|
</tr><tr><td></td>
|
||||||
<%= user.email %></th><td><ul>
|
<td>
|
||||||
|
<%= user.email %></td><td><ul>
|
||||||
<% user.roles.each do |role| %>
|
<% user.roles.each do |role| %>
|
||||||
<li><%= role.name%></li>
|
<li><%= role.name%></li>
|
||||||
<% end %></ul></td>
|
<% end %></ul></td>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Fetsite::Application.routes.draw do
|
|||||||
devise_for :users
|
devise_for :users
|
||||||
scope '(:locale)/admin' do
|
scope '(:locale)/admin' do
|
||||||
resources :users
|
resources :users
|
||||||
|
get 'config',:controller=>:config,:action=>:index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -27,11 +28,7 @@ end
|
|||||||
resources :neuigkeiten
|
resources :neuigkeiten
|
||||||
resources :rubriken
|
resources :rubriken
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
put 'rubriken/(:id)/addmoderator',:controller=>:rubriken,:action=>:addmoderator
|
put 'rubriken/(:id)/addmoderator',:controller=>:rubriken,:action=>:addmoderator
|
||||||
|
|
||||||
|
|
||||||
resources :home
|
resources :home
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user