first version for new member html

This commit is contained in:
Matthew K. Fu JuYuan 2012-09-11 10:52:27 +08:00 committed by Christophe Vilayphiou
parent 969d8c8e57
commit 4818e3f444
14 changed files with 420 additions and 4 deletions

View File

@ -17,7 +17,8 @@ class PagesController < ApplicationController
def show
#begin
@item = Item.first(:conditions => {:path => params[:page_name]})
if @item && @item.is_published #&& (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
#binding.pry
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
impressionist(@item)
case @item.class.to_s
when 'Page'

View File

@ -28,6 +28,7 @@ class User
belongs_to :role
has_and_belongs_to_many :roles
has_and_belongs_to_many :sub_roles
accepts_nested_attributes_for :attribute_values, :allow_destroy => true

View File

@ -0,0 +1,94 @@
<div class="subnav">
<div class="btn-group pull-right view-mode">
<form action="" method="get">
<button class="btn <%= "active" if params[:at].blank? %>"><i class="icon-align-justify"></i> <%= t("admin.new_admin.show_mode.index")%></button>
<button name="at" value="summary" class="btn <%= "active" if params[:at] == "summary" %>"><i class="icon-th-list"></i> <%= t("admin.new_admin.show_mode.summary")%></button>
<button name="at" value="thumbnail" class="btn <%= "active" if params[:at] == "thumbnail" %>"><i class="icon-th-large"></i> <%= t("admin.new_admin.show_mode.thumbnail")%></button>
</form>
</div>
<ul class="nav nav-pills filter">
<li class="accordion-group">
<div class="accordion-heading">
<a href="#collapse-status" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t("admin.new_admin.table_header.status")%> <b class="web-symbol"></b></a>
</div>
</li>
<li class="accordion-group">
<div class="accordion-heading">
<a href="#collapse-category" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t("admin.new_admin.table_header.category")%> <b class="web-symbol"></b></a>
</div>
</li>
<li class="accordion-group">
<div class="accordion-heading">
<a href="#collapse-tags" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t("admin.new_admin.table_header.tags")%> <b class="web-symbol"></b></a>
</div>
</li>
</ul>
<div class="filters">
<div class="accordion-body collapse" id="collapse-status">
<div class="accordion-inner" data-toggle="buttons-checkbox">
<a href="#" class="btn">Full-Time</a>
<a href="#" class="btn">Part-time</a>
<a href="#" class="btn">Adjunct</a>
<a href="#" class="btn">Distinguished</a>
</div>
<div class="filter-clear">
<a href="#" class="btn"><i class="icons-brush-large"></i><%= t("admin.new_admin.table_header.clear_filter")%></a>
</div>
</div>
<div class="accordion-body collapse" id="collapse-category">
<div class="accordion-inner" data-toggle="buttons-checkbox">
<a href="#" class="btn">Category1</a>
<a href="#" class="btn">Category2</a>
</div>
<div class="filter-clear">
<a href="#" class="btn"><i class="icons-brush-large"></i><%= t("admin.new_admin.table_header.clear_filter")%></a>
</div>
</div>
<div class="accordion-body collapse" id="collapse-tags">
<div class="accordion-inner" data-toggle="buttons-checkbox">
<a href="#" class="btn">Tag1</a>
<a href="#" class="btn">Tag2</a>
<a href="#" class="btn">Tag3</a>
<a href="#" class="btn">Tag4</a>
<a href="#" class="btn">Tag5</a>
<a href="#" class="btn">Tag6</a>
<a href="#" class="btn">Tag7</a>
<a href="#" class="btn">Tag8</a>
<a href="#" class="btn">Tag9</a>
<a href="#" class="btn">Tag10</a>
<a href="#" class="btn">Tag11</a>
<a href="#" class="btn">Tag12</a>
<a href="#" class="btn">Tag13</a>
<a href="#" class="btn">Tag14</a>
<a href="#" class="btn">Tag15</a>
<a href="#" class="btn">Tag16</a>
<a href="#" class="btn">Tag17</a>
<a href="#" class="btn">Tag18</a>
<a href="#" class="btn">Tag19</a>
<a href="#" class="btn">Tag20</a>
</div>
<div class="filter-clear">
<a href="#" class="btn"><i class="icons-brush-large"></i><%= t("admin.new_admin.table_header.clear_filter")%></a>
</div>
</div>
<% if params[:at].blank? #header for index%>
<div class="table-label">
<table class="table main-list">
<thead>
<tr>
<th class="span1">
<input type="checkbox">
<a href class="list-remove"><i class="icon-minus-sign"></i></a>
</th>
<th id="sort-roles" class="sort span3"><%= t("admin.new_admin.attributes.roles")%><b class="web-symbol"></b></th>
<th id="sort-name" class="sort span1-2 select active"><%= t("admin.new_admin.attributes.name")%><b class="web-symbol"></b></th>
<th id="sort-email" class="sort span2"><%= t("admin.new_admin.attributes.publications")%><b class="web-symbol"></b></th>
<th id="sort-admin" class="sort span2"><%= t("admin.new_admin.attributes.courses")%><b class="web-symbol"></b></th>
<th id="sort-admin" class="sort span2"><%= t("admin.new_admin.attributes.followers")%><b class="web-symbol"></b></th>
</tr>
</thead>
</table>
</div>
<% end -%>
</div>
</div>

View File

@ -0,0 +1,17 @@
<div class="form-actions form-fixed pagination-right">
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary pull-right") do%>
<i class="icon-plus icon-white"></i><%= t("admin.new_admin.action.add")%>
<% end -%>
<div class="paginationFixed">
<div class="pagination">
<ul>
<li><a href="#"><%= t("admin.new_admin.action.prev")%></a></li>
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#"><%= t("admin.new_admin.action.next")%></a></li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,37 @@
<tr class="with_action">
<td class="span1"><input type="checkbox"></td>
<td class="span3">
<div class="label-group">
<div class="label-td">
<span class="label label-teacher"># TODO:Teacher</span>
<span class="label label-student"># TODO:Student</span>
<span class="label label-staff"># TODO:Staff</span>
</div>
</div>
</td>
<td class="span1-2">
<%= user_for_listing.name %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><a href="#"><%= t("admin.new_admin.action.edit")%> </a></li>
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t("admin.new_admin.action.quick_edit")%><b class="caret"></b></a>
<ul class="dropdown-menu" id="menu1">
<li><a href="#"># TODO:Basic</a></li>
<li><a href="#"># TODO:Picture</a></li>
<li><a href="#"># TODO:Tags</a></li>
<li><a href="#"># TODO:Link</a></li>
<li><a href="#"># TODO:File</a></li>
</ul>
</li>
<li><a href="#"><%= t("admin.new_admin.action.delete")%></a></li>
</ul>
</div>
</td>
<td class="span2"># TODO</td>
<td class="span2"># TODO</td>
<td class="span2">
10,597
<p class="gender male"></p>
</td>
</tr>

View File

@ -0,0 +1,30 @@
<li class="pull-left">
<table class="rolesTag">
<tbody>
<tr>
<td class="teacher"></td>
<td class="staff"></td>
</tr>
</tbody>
</table>
<div class="clear user">
<p class="gender male"></p>
<div class="user-avatar pull-left">
<p class="reflective"></p>
<%= image_tag(user_for_summary.avatar.thumb.url) %>
</div>
<div class="user-meta">
<p class="user-name">
<%= user_for_summary.name%>
</p>
<div class="user-title">
<span>#TODO 教授兼系主任</span><span>#TODO 大學部校友</span>
</div>
<ul class="user-itemborder clear">
<li class="pull-left"><span>#TODO 258</span>Publications</li>
<li class="pull-left"><span>#TODO 16</span>Courses</li>
<li class="pull-left"><span>#TODO 10,578</span>Followers</li>
</ul>
</div>
</div>
</li>

View File

@ -0,0 +1,22 @@
<li class="pull-left">
<table class="rolesTag">
<tbody>
<tr>
<td class="teacher"></td>
<td class="staff"></td>
</tr>
</tbody>
</table>
<div class="user">
<p class="gender male"></p>
<div class="user-avatar">
<p class="reflective"></p>
<%= image_tag(user_for_thumbnail.avatar.thumb.url) %>
</div>
<div class="user-meta">
<p class="user-name">
<%= user_for_thumbnail.name%>
</p>
</div>
</div>
</li>

View File

@ -0,0 +1,18 @@
<%= render :partial => "filter"%>
<table class="table main-list member-list">
<thead>
<tr>
<th class="span1"></th>
<th class="span3"></th>
<th class="span1-2"></th>
<th class="span2"></th>
<th class="span2"></th>
<th class="span2"></th>
</tr>
</thead>
<tbody>
<%= render :partial => "user_for_listing",:collection=> [@users.first]%>
</tbody>
</table>
<%= render :partial=> "index_paginator" %>

View File

@ -0,0 +1,9 @@
<%= render :partial => "filter"%>
<div class="member-abstract">
<ul class="clear">
<% 5.times do %>
<%= render :partial=>"user_for_summary",:collection=> [@users.first]%>
<% end -%>
</ul>
</div>
<%= render :partial=> "index_paginator" %>

View File

@ -0,0 +1,8 @@
<%= render :partial => "filter"%>
<div class="member-large">
<ul class="clear">
<% 5.times do %>
<%= render :partial=>"user_for_thumbnail",:collection=> [@users.first]%>
<% end -%>
</div>
<%= render :partial=> "index_paginator" %>

View File

@ -0,0 +1,135 @@
<div class="user-info clear">
<div class="user-avatar pull-left">
<p class="reflective"></p>
<%= image_tag(@user.avatar.url) %>
</div>
<div class="user-info-basic clear">
<p class="gender male"></p>
<a class="btn pull-right" href="#"><i class="icon-edit"></i> <%= t("admin.new_admin.action.edit")%></a>
<p class="user-name">
<%= @user.name %>
</p>
<p class="user-mail">
<%= @user.email %>
</p>
<hr />
</div>
</div>
<div class="user-data">
<ul class="roles-nav">
<li class="teacher active">
<a href="#teacher" data-toggle="tab">
Teacher
</a>
</li>
<li class="student">
<a href="#student" data-toggle="tab">
Student
</a>
</li>
<li class="staff">
<a href="#staff" data-toggle="tab">
Staff
</a>
</li>
<li class="data">
<a href="#data" data-toggle="tab">
Data
</a>
</li>
</ul>
<div class="tab-content user-info-roles">
<div class="tab-pane fade in active teacher" id="teacher">
<p>講師</p>
</div>
<div class="tab-pane fade staff" id="staff">
staff
</div>
<div class="tab-pane fade student" id="student">
student
</div>
<div class="tab-pane fade data" id="data">
<div class="data-block information">
<h2>Information</h2>
<hr>
<div class="info_input">
<table>
<thead class="list_head">
<tr>
<td>Key</td>
<td>English</td>
<td>Chinese</td>
</tr>
</thead>
<tbody>
<tr class="list_item">
<td>Last Name</td>
<td>Last Name</td>
<td>姓</td>
</tr>
<tr class="list_item">
<td>First Name</td>
<td>First Name</td>
<td>名</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="data-block teacher">
<h2>Teacher</h2>
<hr>
<div class="info_input">
<table>
<thead class="list_head">
<tr>
<td>Key</td>
<td>English</td>
<td>Chinese</td>
</tr>
</thead>
<tbody>
<tr class="list_item">
<td>Last Name</td>
<td>Last Name</td>
<td>姓</td>
</tr>
<tr class="list_item">
<td>First Name</td>
<td>First Name</td>
<td>名</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="data-block student">
<h2>Student</h2>
<hr>
<div class="info_input">
<table>
<thead class="list_head">
<tr>
<td>Key</td>
<td>English</td>
<td>Chinese</td>
</tr>
</thead>
<tbody>
<tr class="list_item">
<td>Last Name</td>
<td>Last Name</td>
<td>姓</td>
</tr>
<tr class="list_item">
<td>First Name</td>
<td>First Name</td>
<td>名</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -36,6 +36,22 @@
<%#= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %>
<%# end -%>
<%= content_tag :li, :class => active_for_controllers('users_new_interface') do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.new_admin.user'), admin_users_new_interface_index_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('users_new_interface')) do -%>
<%= content_tag :li, link_to(t('admin.new_admin.side_bar.all_user'), ), :class => active_for_action('users_new_interface', 'index') %>
<%= content_tag :li, link_to("#TODO Role1", ), :class => active_for_action('users_new_interface', 'index') %>
<%= content_tag :li, link_to(t("#TODO Role2"), ), :class => active_for_action('users_new_interface', 'index') %>
<%= content_tag :li, link_to(t('admin.new_admin.side_bar.add_user')) %>
<%= content_tag :li, link_to(t('admin.new_admin.side_bar.user_roles')) %>
<%= content_tag :li, link_to(t('admin.new_admin.side_bar.user_info')) %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => active_for_controllers('page_contexts') || active_for_app_auth('page_content') || active_for_ob_auths_object("PageContext") do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), panel_page_content_back_end_page_contexts_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%>
@ -56,6 +72,7 @@
<% end -%>
<% end %>
<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), panel_web_resource_back_end_web_links_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%>

View File

@ -210,9 +210,35 @@ zh_tw:
no_home_page: 您沒有首頁
no_layout: 您沒有佈局
name: 名稱
nccu: 政大客制
nccu_c:
nccu_ldap_uid: NCCU LDAP 帳號
new_admin:
side_bar:
all_user: 所有使用者
add_user: 新增使用者
user_roles: 角色
user_info: 使用者資訊
user: 會員
action:
add: 新增
edit: 編輯
delete: 刪除
quick_edit: 快速編輯
next: 下一頁
prev: 上一頁
attributes:
roles: 角色
name: 名稱
publications: 出版數
courses: 開課數
followers: 被關注數
show_mode:
index: 清單
summary: 摘要
thumbnail: 縮圖
table_header:
status: 狀態
category: 分類
tags: 標籤
clear_filter: 重置
new_asset: 新增資產
new_component: 新增元件
new_design: 新設計

View File

@ -127,6 +127,7 @@ Orbit::Application.routes.draw do
resources :tags
resources :translations
resources :users
resources :users_new_interface
end
# end admin