部分网页标题不标准问题,补交之前漏掉未添加的文件

This commit is contained in:
z9hang 2014-10-14 16:50:22 +08:00
parent 328b9b5e5b
commit f957666b25
21 changed files with 144 additions and 5 deletions

View File

@ -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://jashkenas.github.com/coffee-script/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the WebFooterCompany controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,50 @@
class WebFooterCompaniesController < ApplicationController
layout 'admin'
menu_item :projects, :only => :projects
menu_item :plugins, :only => :plugins
menu_item :info, :only => :info
before_filter :require_admin
def index
@companys = WebFooterCompany.all
end
def new
@company = WebFooterCompany.new
end
def create
@company = WebFooterCompany.new(params[:web_footer_company])
if @company.save
flash[:notice] = l(:notice_successful_create)
redirect_to web_footer_companies_path
else
flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}"
new
render :action => 'new'
end
end
def destroy
@company = WebFooterCompany.find(params[:id])
@company.destroy
redirect_to web_footer_companies_path
end
def edit
@company = WebFooterCompany.find(params[:id])
end
def update
@company = WebFooterCompany.find(params[:id])
if @company.update_attributes(params[:web_footer_company])
flash[:notice] = l(:notice_successful_update)
redirect_to web_footer_companies_path
else
flash[:error] = "#{l :web_footer_company_update_fail}: #{@company.errors.full_messages[0]}"
edit
render :action => 'edit'
end
end
end

View File

@ -0,0 +1,2 @@
module WebFooterCompaniesHelper
end

View File

@ -0,0 +1,6 @@
class WebFooterCompany < ActiveRecord::Base
attr_accessible :logo_size, :name, :url
validates_presence_of :name,:url
validates_length_of :name,:url, :maximum => 255
validates_format_of :url,:with => /(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?/,:message => l(:is_not_url_error)
end

View File

@ -0,0 +1,3 @@
class WebFooterOranizer < ActiveRecord::Base
attr_accessible :description, :name
end

View File

@ -72,4 +72,4 @@
<%= render :partial => 'show_all_attachment' %>
</div>
<% html_title(l(:label_attachment_plural)) -%>
<% html_title(l(:project_module_files)) -%>

View File

@ -37,4 +37,5 @@
<p class="nodata">
<%= l(:label_no_data) %>
</p>
<% end %>
<% end %>
<% html_title(l(:label_member)) -%>

View File

@ -110,4 +110,5 @@ function checkMaxLength() {
<%= pagination_links_full @feedback_pages %>
</ul>
</div>
</div>
</div>
<% html_title(l(:label_project_tool_response)) -%>

View File

@ -13,3 +13,5 @@
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
<%= javascript_tag "$('#project_name').focus();" %>
<% end %>
<% html_title(l(:label_project_new)) -%>

View File

@ -100,5 +100,5 @@
<%= pagination_links_full @events_pages %>
</ul>
</div>
<% html_title(l(:label_overview)) -%>

View File

@ -30,4 +30,5 @@
</tr>
</table></li></ul>
<% end %>
</div>
</div>
<% html_title(l(:label_followers)) -%>

View File

@ -0,0 +1,10 @@
class CreateWebFooterOranizers < ActiveRecord::Migration
def change
create_table :web_footer_oranizers do |t|
t.string :name
t.text :description
t.timestamps
end
end
end

View File

@ -0,0 +1,11 @@
class CreateWebFooterCompanies < ActiveRecord::Migration
def change
create_table :web_footer_companies do |t|
t.string :name
t.string :logo_size
t.string :url
t.timestamps
end
end
end

View File

@ -108,3 +108,4 @@ function change_option(flag) {
<%= stylesheet_link_tag "code_review.css", :plugin => "redmine_code_review", :media => "screen" %>
<% end %>
</div>
<% html_title(l(:code_reviews)) -%>

11
test/fixtures/web_footer_companies.yml vendored Normal file
View File

@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
name: MyString
logo_size: MyString
url: MyString
two:
name: MyString
logo_size: MyString
url: MyString

View File

@ -0,0 +1,9 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
one:
name: MyString
description: MyText
two:
name: MyString
description: MyText

View File

@ -0,0 +1,7 @@
require 'test_helper'
class WebFooterCompaniesControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,4 @@
require 'test_helper'
class WebFooterCompaniesHelperTest < ActionView::TestCase
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class WebFooterCompanyTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class WebFooterOranizerTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end