Permalink
Browse files

Merge branch 'develop' of http://github.com/Th0ar/zjforum into develop

Conflicts:
	app/views/donates/show.html.slim
	app/views/layouts/devise/registrations.html.slim
	app/views/messages/show.html.slim
  • Loading branch information...
2 parents 832ac88 + 9cfdf6c commit c9fe92f4043a8929e61407b0e88064ebcadc2801 @ranxian committed Oct 31, 2012
@@ -16,15 +16,6 @@
//= require kindeditor
jQuery(document).ready(function($) {
- $('.login-btn').click(function(){
- if ($('#Login').length == 0) {
- $('body').append('<div></div>').children('div:last-child').load('/users/sign_in',function(x){
- $('#Login').modal('show');
- })
- } else {
- $('#Login').modal('show');
- }
- })
$('form textarea').keydown(function (e) {
if ( (e.metaKey || e.ctrlKey) && e.keyCode == 13) {
$(this).closest('form').submit();
@@ -14,6 +14,15 @@
@import "bootstrap/bootstrap.less";
+.controls > textarea {
+ width: 360px;
+}
+.container-small{
+ width: 580px;
+ &>.well {
+ box-shadow: 2px 3px 6px rgba(0,0,0,0.2);
+ }
+}
small.author {
line-height: 20px;
font-size: 14px;
@@ -73,6 +82,7 @@ body > * {
}
#nav-bar {
+ background-color: #C6A76C;
#gradient > .vertical(#F7D390, #B89A64);
.navbar .nav {
li > a {
@@ -85,9 +95,6 @@ body > * {
}
}
-#nav-bar {
- background-color: #C6A76C;
-}
hr {
border-bottom-color: #FFFFFF;
@@ -147,12 +154,6 @@ hr {
}
}
}
-
-.login-form {
-
-}
-
-
#debug {
position: absolute;
right: 0;
@@ -180,11 +181,6 @@ h1 {
.clearboth {
clear: both;
}
-
-.form-actions {
- border-top: none;
- background-color: #FDFEE2;
-}
.actions {
margin-top: 9px;
}
@@ -17,5 +17,5 @@
.control-group
= f.label :image, '待上传图片', class: 'control-label'
.controls = f.file_field :image
- .form-actions
- = f.submit '保存', class: 'btn btn-primar-0-y'
+ .control-group
+ .controls = f.submit '保存', class: 'btn btn-primar-0-y'
@@ -1,5 +1,6 @@
-p#notice = notice
-
+- if notice
+ p#notice.alert.alert-success = notice
+
h3
= @bigpic.title
h3
@@ -18,5 +18,5 @@ legend 编辑用户资料
.control-group
= f.label :avatar, '头像', class: 'control-label'
.controls = f.file_field :avatar
- .form-actions
- = f.submit '更改', class: 'btn btn-primar-0-y'
+ .control-group
+ .controls = f.submit '更改', class: 'btn btn-primar-0-y'
@@ -1,23 +1,21 @@
-.modal.hide.fade#Login tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
- .modal-header
- button.close type="button" data-dismiss="modal" aria-hidden="true" &times;
- h3 登陆
- = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
- .form-horizontal.modal-body
- .control-group
- label.control-label for="inputEmail" Email
- .controls
- = f.email_field :email
- .control-group
- label.control-label for="inputPassword" 密码
- .controls
- = f.password_field :password
- .control-group
- .controls
- - if devise_mapping.rememberable?
- label.checkbox
- = f.check_box :remember_me
- | 记住我
- .modal-footer
- = f.submit "登陆", class: 'btn btn-primar-0-y'
- = render "devise/shared/links"
+= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
+ legend 登陆
+ .form-horizontal
+ .control-group
+ label.control-label for="inputEmail" Email
+ .controls
+ = f.email_field :email
+ .control-group
+ label.control-label for="inputPassword" 密码
+ .controls
+ = f.password_field :password
+ .control-group
+ .controls
+ - if devise_mapping.rememberable?
+ label.checkbox
+ = f.check_box :remember_me
+ | 记住我
+ .control-group
+ .controls
+ = f.submit "登陆", class: 'btn btn-primary'
+ = render "devise/shared/links"
@@ -0,0 +1,10 @@
+- if notice
+ p#notice.alert.alert-success = notice
+
+p
+ strong Content:
+ = @donate.content
+
+= link_to 'Edit', edit_donate_path(@donate)
+'|
+= link_to 'Back', donates_path
@@ -17,4 +17,5 @@
.control-group
= f.label :content , '详情', class: 'control-label'
.controls = f.text_area :content, rows: 10
- .form-actions = f.submit '保存', class: 'btn btn-primar-0-y'
+ .control-group
+ .controls = f.submit '保存', class: 'btn btn-primar-0-y'
@@ -7,8 +7,18 @@
background-color: #FFFFFF;
box-shadow: 0px 1px 4px #555;
position: relative;
+ .carousel-control {
+ border-radius: 5px;
+ padding: 20px 0px;
+ border-width: 1px;
+ opacity: 0.2;
+ &:hover {
+ opacity: 0.4;
+ }
+ }
.carousel-caption {
padding: 10px 15px;
+ background-color: rgba(0, 0, 0, 0.5);
h4 {
color: #DDD;
font-size: 15px;
@@ -21,6 +31,7 @@
}
&:hover {
text-decoration: none;
+ background-color: rgba(0, 0, 0, 0.65);
p, h4 {
color: #FFF;
text-shadow: 0 0 1.5px #FDFEE2;
@@ -28,7 +28,8 @@ html
li = link_to '用户管理', user_manage_index_path
ul.nav.pull-right
- if not user_signed_in?
- li: a.login-btn href="javascript:;" 登陆
+ li = link_to '登陆', new_user_session_path
+ / li: a.login-btn href="javascript:;" 登陆
/ li: a.login-btn href="#Login" role="button" class="btn" data-toggle="modal" data-remote="/users/sign_in" 登陆
- else
li = link_to "欢迎您,#{current_user.name}", edit_user_registration_path, title: '单击以修改资料'
@@ -26,13 +26,13 @@ html
li = link_to '用户管理', user_manage_index_path
ul.nav.pull-right
- if not user_signed_in?
- li: a.login-btn href="javascript:;" 登陆
+ li = link_to '登陆', new_user_session_path
- else
li = link_to "欢迎您,#{current_user.name}", edit_user_registration_path, title: '单击以修改资料'
li = link_to('登出', destroy_user_session_path, method: 'delete')
#main
- .container
+ .container.container-small
.row
.offset2.span10
- if notice
@@ -1 +1,50 @@
-== yield
+doctype html
+html
+ head
+ title Zjforum
+ meta name="keywords" content=""
+ meta name="author" content=""
+ = stylesheet_link_tag "application", :media => "all"
+ = csrf_meta_tags
+ = yield :style
+ body
+ #top-banner
+ .container
+ h1 之江发展论坛
+ #nav-bar
+ .container
+ .navbar
+ ul.nav
+ li = link_to '首页', root_path
+ li = link_to '新闻', news_index_path
+ li = link_to '校友', mates_path
+ li = link_to '留言板', messages_path
+ li = link_to '讨论版', posts_path
+ li = link_to '支持我们', donates_path
+ li = link_to '近期活动', events_path
+ li = link_to '用户管理', user_manage_index_path
+ ul.nav.pull-right
+ - if not user_signed_in?
+ li = link_to '登陆', new_user_session_path
+ - else
+ li = link_to "欢迎您,#{current_user.name}", edit_user_registration_path, title: '单击以修改资料'
+ li = link_to('登出', destroy_user_session_path, method: 'delete')
+
+ #main
+ .container.container-small
+ .well
+ == yield
+
+
+ #foot
+ .container
+ = current_user
+
+ p
+ | Copyright© 北京大学 之江发展论坛
+ = link_to '关于我们', about_path
+
+
+
+ = javascript_include_tag "application"
+ = yield :script
@@ -21,13 +21,13 @@ html
li = link_to '校友', mates_path
li = link_to '留言板', messages_path
li = link_to '讨论版', posts_path
- li = link_to '赞助', donates_path
+ li = link_to '支持我们', donates_path
li = link_to '近期活动', events_path
- if admin?
li = link_to '用户管理', user_manage_index_path
ul.nav.pull-right
- if not user_signed_in?
- li: a.login-btn href="javascript:;" 登陆
+ li = link_to '登陆', new_user_session_path
- else
li = link_to "欢迎您,#{current_user.name}", edit_user_registration_path, title: '单击以修改资料'
li = link_to('登出', destroy_user_session_path, method: 'delete')
@@ -22,4 +22,5 @@
= f.label :photo, '照片', class: 'control-label'
.controls = image_tag @mate.photo
.controls = f.file_field :photo
- .form-actions = f.submit '保存', class: 'btn btn-primar-0-y'
+ .control-group
+ .controls = f.submit '保存', class: 'btn btn-primar-0-y'
@@ -0,0 +1,10 @@
+- if notice
+ p#notice.alert.alert-success = notice
+
+p
+ strong Content:
+ = @message.content
+
+= link_to 'Edit', edit_message_path(@message)
+'|
+= link_to 'Back', messages_path
@@ -1,4 +1,5 @@
= form_for @user, url: { action: :update }, html: { class: 'form-horizontal' } do |f|
+ legend 管理用户
- if @user.errors.any?
#error_explanation
h2 = "#{pluralize(@user.errors.count, "error")} prohibited this user from being saved:"
@@ -21,5 +22,5 @@
.control-group
= f.label :avatar, '头像', class: 'control-label'
.controls = f.file_field :avatar
- .form-actions
- = f.submit '更新', class: 'btn btn-primar-0-y'
+ .control-group
+ .controls = f.submit '更新', class: 'btn btn-primar-0-y'
@@ -43,6 +43,7 @@
p style="margin: 0px; color: #999;" = user.email
.clearboth
= link_to "×", delete_user_manage_path(user), method: :delete, remote: true, class: 'delete'
+.clearboth
= content_for :script do
javascript:
@@ -1,5 +1,6 @@
-p#notice = notice
-
+- if notice
+ p#notice.alert.alert-success = notice
+
p
strong Name:
= @user.name

0 comments on commit c9fe92f

Please sign in to comment.