组织样式修改
This commit is contained in:
parent
7fe112c337
commit
bd3d0547f5
|
@ -37,19 +37,6 @@ class OrganizationsController < ApplicationController
|
|||
@organization = Organization.new
|
||||
render :layout => 'new_base'
|
||||
end
|
||||
|
||||
def edit
|
||||
@organization = Organization.find(params[:id])
|
||||
end
|
||||
|
||||
def destroy
|
||||
@organization = Organization.find(params[:id])
|
||||
@organization.destroy
|
||||
respond_to do |format|
|
||||
format.html{ redirect_to admin_organization_path }
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@organization = Organization.new
|
||||
@organization.name = params[:organization][:name]
|
||||
|
@ -94,11 +81,7 @@ class OrganizationsController < ApplicationController
|
|||
end
|
||||
@page = params[:page]
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
if !params[:show_homepage].nil?
|
||||
render :layout => 'base_organization'
|
||||
end
|
||||
}
|
||||
format.html
|
||||
format.js
|
||||
end
|
||||
else
|
||||
|
@ -106,13 +89,6 @@ class OrganizationsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def homepage
|
||||
@organization = Organization.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_organization'}
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@organization = Organization.find(params[:id])
|
||||
@organization.name = params[:organization][:name]
|
||||
|
@ -166,12 +142,6 @@ class OrganizationsController < ApplicationController
|
|||
# end
|
||||
end
|
||||
|
||||
def cancel_homepage
|
||||
@org = Organization.find(params[:id])
|
||||
@org.home_id = nil
|
||||
@org.save
|
||||
end
|
||||
|
||||
def autocomplete_search
|
||||
@project = Project.find(params[:project_id])
|
||||
#@flag = params[:flag] || false
|
||||
|
|
|
@ -23,13 +23,33 @@
|
|||
</head>
|
||||
<!--add by huang-->
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer">
|
||||
<div class="orgContainer">
|
||||
<div class="orgNav">
|
||||
<div class="navOrgLogo fl"><a href="javascript:void(0);"><img src="/images/home_logo.png" width="21" height="19" alt="确实Trustie" class="mt3" /></a></div>
|
||||
<ul>
|
||||
<li class="navOrgMenu fl"> <%= link_to '首页', organization_path(@organization, :show_homepage => 1),:class=>"linkGrey8 f14" %></li>
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<li class="navOrgMenu fr"><%=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>
|
||||
<% else %>
|
||||
<%= render :partial => 'layouts/unlogin_header' %>
|
||||
<li class="navOrgMenu fr"><a href="<%= signin_path(:login=>true) %>" class="linkGrey8 f14">登录</a></li>
|
||||
<li class="navOrgMenu fr"><a href="<%= signin_path(:login=>false) %>" class="linkGrey8 f14 mr15">注册</a></li>
|
||||
<% end %>
|
||||
</div>
|
||||
</ul>
|
||||
<!--<div class="navHomepageProfile">
|
||||
<ul>
|
||||
<li class="homepageProfileMenuIcon"><a href="javascript:void(0);">
|
||||
<div class="mt5 mb8"><img src="images/homepageProfileImage.png" width="40" height="40" /></div>
|
||||
</a>
|
||||
<ul class="topnav_login_list" style="display:none;">
|
||||
<li><a href="javascript:void(0);" class="menuGrey">修改资料</a> </li>
|
||||
<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>
|
||||
<li><a href="javascript:void(0);" class="menuGrey">退出</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<div class="homepageContent">
|
||||
|
@ -85,7 +105,7 @@
|
|||
<%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
<div class="homepageRight" style="margin-top:<%= params[:show_homepage].nil? ? '10px':'0px' %>;">
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
|
@ -96,7 +116,22 @@
|
|||
|
||||
<!--页面底部-->
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div id="Footer">
|
||||
<div class="footerAboutContainer">
|
||||
<ul class="footerAbout">
|
||||
<li class="fl"><a href="<%= about_us_path %>" class=" f_grey mw20" target="_blank">关于我们</a>|</li>
|
||||
<li class="fl"><a href="<%= agreement_path %>" class=" f_grey mw20" target="_blank">服务协议</a>|</li>
|
||||
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank">帮助中心</a>|</li>
|
||||
<li class="fl"><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="f_grey mw20" target="_blank">贴吧交流</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<ul class="copyright mt10">
|
||||
<li class="fl mr30">Copyright © 2007-2015, All Rights Riserved</li>
|
||||
<li>ICP备09019772</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "组织首页",organization_path(@organization, :show_homepage => 1), :class => 'homepageMenuText', :target => '_blank' %>
|
||||
<%= link_to "组织首页",organization_path(@organization, :show_homepage => 1), :class => 'homepageMenuText' %>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "动态",organization_path(organization), :class => "homepageMenuText" %>
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
<li class="orgListRole fb">状态</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser">组织首页</li>
|
||||
<li class="orgListUser">默认</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser">动态</li>
|
||||
<li class="orgListUser">默认</li>
|
||||
|
|
|
@ -2,4 +2,5 @@ $("#homepageLeftMenuCourses").html("");
|
|||
$("#homepageLeftMenuCourses").append("<ul>");
|
||||
$("#homepageLeftMenuCourses").append("<%= escape_javascript(render :partial => 'layouts/org_courses',
|
||||
:locals=>{:courses=>@organization.courses.reorder('created_at').uniq.limit(5),:org_id=>@organization.id,:page=> 1}) %>");
|
||||
$("#homepageLeftMenuCourses").append("</ul>");
|
||||
$("#homepageLeftMenuCourses").append("</ul>");
|
||||
$("#homepageLeftMenuCourses").show();
|
|
@ -2,4 +2,5 @@ $("#homepageLeftMenuProjects").html("");
|
|||
$("#homepageLeftMenuProjects").append("<ul>");
|
||||
$("#homepageLeftMenuProjects").append("<%= escape_javascript(render :partial => 'layouts/org_projects',
|
||||
:locals=>{:projects=>@organization.projects.reorder('created_at').uniq.limit(5),:org_id=>@organization.id,:page=> 1}) %>");
|
||||
$("#homepageLeftMenuProjects").append("</ul>");
|
||||
$("#homepageLeftMenuProjects").append("</ul>");
|
||||
$("#homepageLeftMenuProjects").show();
|
|
@ -15,7 +15,7 @@
|
|||
版本库地址:<%= @repos_url %>
|
||||
<% else %>
|
||||
版本库地址:<%= h @repository.url %>
|
||||
<% end %>-
|
||||
<% end %>
|
||||
<!-- added by bai -->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
57
db/schema.rb
57
db/schema.rb
|
@ -543,23 +543,32 @@ ActiveRecord::Schema.define(:version => 20151204062220) do
|
|||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||
|
||||
create_table "dts", :force => true do |t|
|
||||
t.string "IPLineCode"
|
||||
t.string "Description"
|
||||
t.string "Num"
|
||||
t.string "Variable"
|
||||
t.string "TraceInfo"
|
||||
t.string "Method"
|
||||
create_table "dts", :primary_key => "Num", :force => true do |t|
|
||||
t.string "Defect", :limit => 50
|
||||
t.string "Category", :limit => 50
|
||||
t.string "File"
|
||||
t.string "IPLine"
|
||||
t.string "Review"
|
||||
t.string "Category"
|
||||
t.string "Defect"
|
||||
t.string "PreConditions"
|
||||
t.string "StartLine"
|
||||
t.string "Method"
|
||||
t.string "Module", :limit => 20
|
||||
t.string "Variable", :limit => 50
|
||||
t.integer "StartLine"
|
||||
t.integer "IPLine"
|
||||
t.string "IPLineCode", :limit => 200
|
||||
t.string "Judge", :limit => 15
|
||||
t.integer "Review", :limit => 1
|
||||
t.string "Description"
|
||||
t.text "PreConditions", :limit => 2147483647
|
||||
t.text "TraceInfo", :limit => 2147483647
|
||||
t.text "Code", :limit => 2147483647
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "id", :null => false
|
||||
end
|
||||
|
||||
create_table "editor_of_documents", :force => true do |t|
|
||||
t.integer "editor_id"
|
||||
t.integer "org_document_comment_id"
|
||||
t.datetime "created_at"
|
||||
end
|
||||
|
||||
create_table "enabled_modules", :force => true do |t|
|
||||
|
@ -891,16 +900,6 @@ ActiveRecord::Schema.define(:version => 20151204062220) do
|
|||
|
||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_details_copy", :force => true do |t|
|
||||
t.integer "journal_id", :default => 0, :null => false
|
||||
t.string "property", :limit => 30, :default => "", :null => false
|
||||
t.string "prop_key", :limit => 30, :default => "", :null => false
|
||||
t.text "old_value"
|
||||
t.text "value"
|
||||
end
|
||||
|
||||
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_replies", :id => false, :force => true do |t|
|
||||
t.integer "journal_id"
|
||||
t.integer "user_id"
|
||||
|
@ -1171,6 +1170,14 @@ ActiveRecord::Schema.define(:version => 20151204062220) do
|
|||
t.datetime "created_at"
|
||||
end
|
||||
|
||||
create_table "org_subfields", :force => true do |t|
|
||||
t.integer "organization_id"
|
||||
t.integer "priority"
|
||||
t.string "name"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "organizations", :force => true do |t|
|
||||
t.string "name"
|
||||
t.text "description"
|
||||
|
|
Loading…
Reference in New Issue