-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
472 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
/* | ||
*= require twitter/bootstrap | ||
*= require_tree ./sprites/ | ||
*= require_self | ||
*/ | ||
body { color: #333; } | ||
|
||
body, p, ol, ul, td { | ||
font-family: verdana, arial, helvetica, sans-serif; | ||
font-size: 13px; | ||
line-height: 18px; | ||
} | ||
|
||
pre { | ||
background-color: #eee; | ||
padding: 10px; | ||
font-size: 11px; | ||
} | ||
.group { margin-bottom:20px; } | ||
.group h2 { font-size:12px; margin-bottom:8px; } | ||
.group ul { margin:0 20px;} | ||
.pagination { clear:both; margin-top:10px; text-align: left;} | ||
|
||
table tr.deleted td { text-decoration: line-through; color:#999} | ||
|
||
html { | ||
width: 100%; | ||
height: 100%; | ||
background:#eee image-url('bg.png') bottom left repeat; | ||
} | ||
body { background:none;} | ||
|
||
code { background:none; } | ||
|
||
.breadcrumb { color:#999;} | ||
|
||
|
||
.container-fluid { padding:0; } | ||
.container-fluid > .sidebar { | ||
position:absolute; | ||
left:auto; | ||
right:0; | ||
top:0; | ||
width: 220px; | ||
} | ||
|
||
.container-fluid > .content { | ||
margin-left:0; | ||
margin-right: 240px; | ||
} | ||
|
||
fieldset { margin-bottom:0;} | ||
fieldset legend { font-size:16px; font-weight:bold;} | ||
.actions { margin-bottom:0;} | ||
.buttons { margin-top:10px; } | ||
form { | ||
margin-bottom:0; | ||
|
||
.input { | ||
> [class*="span"] { | ||
float: left; | ||
display: inline; | ||
margin-right: 10px; | ||
|
||
input, textarea, select, .uneditable-input { | ||
width: 100%; | ||
} | ||
input[type=checkbox], | ||
input[type=radio], | ||
input[type=button], | ||
input[type=reset], | ||
input[type=submit] { | ||
width: auto; | ||
} | ||
} | ||
} | ||
} | ||
|
||
p.tips{ color:#f00; } | ||
|
||
.pagination { margin:0; margin-top:10px; } | ||
|
||
a.label:hover { text-decoration: none; color:#FFF;} | ||
|
||
.popover { | ||
h3.title { | ||
font-size:14px; padding:5px 8px; | ||
i { float:right; font-size:12px; color:#999; font-style: normal;} | ||
} | ||
.content { padding:8px; font-size:12px; color:#666; } | ||
} | ||
|
||
a[rel=userpopover] { | ||
display: inline-block; | ||
} | ||
|
||
.box { | ||
background-color: #fff; | ||
padding:10px; | ||
margin: 0 0 20px 0; /* negative indent the amount of the padding to maintain the grid system */ | ||
-webkit-border-radius: 6px; | ||
-moz-border-radius: 6px; | ||
border-radius: 6px; | ||
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); | ||
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15); | ||
box-shadow: 0 1px 2px rgba(0,0,0,.15); | ||
h2.title { | ||
margin:0 -10px; padding:0 10px; | ||
font-size:14px; color:#999; line-height:100%; | ||
border-bottom:1px solid #ddd; padding-bottom:8px; | ||
} | ||
} | ||
|
||
|
||
.footer { | ||
border-top:0; | ||
min-width: 940px; | ||
margin-bottom:30px; | ||
margin-top:0px; | ||
padding:0; | ||
text-shadow: 0 1px 0 #fff; | ||
} | ||
.footer p { | ||
margin:3px 0; | ||
color: #555; | ||
} | ||
#main h1 { font-size:14px; line-height:26px; font-weight:bold; color:#333; margin-bottom:10px; } | ||
|
||
.topbar { position: static; margin-bottom:20px;} | ||
|
||
textarea.long { width:670px;} | ||
textarea.span16 { width:910px;} | ||
.input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge { width:520px;} | ||
|
||
div.field, div.actions { | ||
margin-bottom: 10px; | ||
} | ||
div.field .hint { font-size:12px; color:#999;} | ||
|
||
.field_with_errors { | ||
display:inline; | ||
color:#b16125; | ||
} | ||
|
||
.alert-message { margin-bottom:8px;} | ||
|
||
.secondary-nav .notifications a { | ||
font-weight: bold; | ||
padding: 11px 8px 10px; | ||
} | ||
|
||
.secondary-nav .notifications a:hover { | ||
background: #444; | ||
background: rgba(255, 255, 255, 0.05); | ||
} | ||
|
||
.secondary-nav .notifications a .count { | ||
background-color: #666; | ||
padding: 2px 6px; | ||
border-radius: 2px; | ||
color: #999; | ||
-moz-border-radius: 2px; | ||
} | ||
|
||
.secondary-nav .notifications.unread a .count { | ||
background-color: #C43C35; | ||
color: white; | ||
} | ||
|
||
.icon { display:inline-block;} | ||
|
||
|
||
.simple_form { | ||
label.required { | ||
abbr { color:#c00;} | ||
} | ||
} | ||
|
||
/* bootstrap puts .clearfix inside form, doesn't make much sense */ | ||
.clearfix { | ||
margin-bottom: 18px; | ||
zoom: 1; | ||
&:before, &:after { | ||
display: table; | ||
content: ""; | ||
zoom: 1; | ||
} | ||
&:after { | ||
clear: both; | ||
} | ||
} | ||
|
||
#error_page { | ||
padding:60px; | ||
h1 { font-size:600%; color:#aaa; margin-bottom:100px;} | ||
p { font-size:16px; } | ||
} | ||
|
||
#preview { | ||
/* copied from twitter bootstrap */ | ||
margin-top:0px; | ||
border: 1px solid #ccc; | ||
padding:4px; | ||
min-height:400px; | ||
-webkit-border-radius: 3px; | ||
-moz-border-radius: 3px; | ||
border-radius: 3px; | ||
#reply & { | ||
width:578px; | ||
margin-bottom:10px; | ||
min-height:72px; | ||
} | ||
} | ||
|
||
.help-block ul { margin-bottom:0; } | ||
.editor_toolbar { | ||
position:relative; | ||
margin-bottom:5px; | ||
.icons { position:absolute; top:3px; right:0; } | ||
.pills { | ||
margin: 0; | ||
list-style: none; | ||
li { display:inline;} | ||
a { | ||
-moz-border-radius: 8px; | ||
-webkit-border-radius: 8px; | ||
border-radius: 8px; | ||
padding:0 5px; | ||
line-height:18px; | ||
font-size:12px; | ||
margin-right:6px; | ||
text-shadow:0; | ||
color:#444; | ||
border:1px solid #fff; | ||
} | ||
a:hover { | ||
background:#fff; | ||
color:#00438A; | ||
text-decoration: underline; | ||
text-shadow:0; | ||
} | ||
.active { | ||
a { | ||
background:#fff; | ||
border:1px solid #ddd; | ||
color:#666; | ||
text-shadow:0; | ||
} | ||
a:hover { text-decoration: none;} | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
#post_upload_images { position:absolute;bottom:0;right:0;width:0;height:0;overflow:hidden; } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Cpanel::AccountsController < Cpanel::BaseController | ||
def index | ||
@items = Account.unscoped.desc(:_id).paginate :page => params[:page], :per_page => 100 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# coding: utf-8 | ||
class Cpanel::BaseController < ApplicationController | ||
layout "cpanel" | ||
before_filter :require_admin | ||
|
||
protected | ||
|
||
def require_admin | ||
authenticate_or_request_with_http_basic do |username, password| | ||
username == "zoe" && password == "huodongrili" | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Cpanel::BlogsController < Cpanel::BaseController | ||
def index | ||
@blogs = Blog.unscoped.desc(:_id).paginate :page => params[:page], :per_page => 30 | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Cpanel::ChatsController < Cpanel::BaseController | ||
def index | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Cpanel::HomeController < Cpanel::BaseController | ||
def index | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Cpanel::AccountsHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Cpanel::BaseHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Cpanel::BlogsHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Cpanel::ChatsHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module Cpanel::HomeHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<% content_for :sitemap do %> | ||
<span class="current">用户列表</span> | ||
<% end %> | ||
<h1>用户列表</h1> | ||
|
||
<table class="table table-condensed"> | ||
<tr class="head"> | ||
<td class="first">ID</td> | ||
<td style="width:200px">Username</td> | ||
<td >email</td> | ||
<td >login</td> | ||
<td>at</td> | ||
<td>State</td> | ||
<td></td> | ||
</tr> | ||
|
||
<% @items.each do |account| %> | ||
<tr class="<%= "deleted" if !account.deleted_at.blank? %>"> | ||
<td class="first"><%= account.id %></td> | ||
<td><%= truncate(account.username,:length => 30) %></td> | ||
<td><%= account.email %></td> | ||
<td><%= account.login %></td> | ||
<td><%= account.created_at %></td> | ||
<td> | ||
</td> | ||
</tr> | ||
<% end %> | ||
</table> | ||
<%= will_paginate @items %> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Cpanel::Blogs#index</h1> | ||
<p>Find me in app/views/cpanel/blogs/index.html.erb</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Cpanel::Chats#index</h1> | ||
<p>Find me in app/views/cpanel/chats/index.html.erb</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>管理中心</h1> | ||
<p>这里是管理员的地盘,其他人不许进来~</p> |
Oops, something went wrong.