Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop

This commit is contained in:
ganyiang 2014-05-22 16:08:08 +08:00
commit 5374addb5a
9 changed files with 58 additions and 7 deletions

View File

@ -474,7 +474,7 @@ module ApplicationHelper
end end
def user_url_and_time(user_name, user_url, created) def user_url_and_time(user_name, user_url, created)
unless user_name.nil? unless user_name.nil? || user_name == ''
l(:label_added_time_by, :author => link_to(user_name, user_url), :age => time_tag(created)).html_safe l(:label_added_time_by, :author => link_to(user_name, user_url), :age => time_tag(created)).html_safe
else else
l(:label_added_time, :age => time_tag(created)).html_safe l(:label_added_time, :age => time_tag(created)).html_safe

3
app/models/bug_to_osp.rb Normal file
View File

@ -0,0 +1,3 @@
class BugToOsp < ActiveRecord::Base
# attr_accessible :title, :body
end

View File

@ -14,7 +14,12 @@
<td> <td>
<table width="630px" border="0"> <table width="630px" border="0">
<tr> <tr>
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %></td> <td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
<% if topic.url.nil? || topic.url == '' %>
<%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %>
<% else %>
<%= link_to h(topic.subject), topic.url %>
<% end %></td>
<td align="right" rowspan="3"> <td align="right" rowspan="3">
<table class="borad-count"> <table class="borad-count">
<tr> <tr>
@ -48,11 +53,11 @@
<tr> <tr>
<td colspan="2" ><span class="font_description"> </span></td> <td colspan="2" ><span class="font_description"> </span></td>
</tr> </tr>
<!-- <tr> <tr>
<td align="left" colspan="2" ><span class="font_lighter"><%#= authoring topic.created_at, topic.author %> <td align="left" colspan="2" ><span class="font_lighter"><%= user_url_and_time topic.username, topic.userhomeurl, topic.created_at %>
<br /> <br />
</span></td> </span></td>
</tr> --> </tr>
<tr> <tr>
<td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %> <td align="left" colspan="2" >帖子来源:<span class="font_lighter" style="color: #068d9c"><%=link_to 'OSChina', topic.url %>
</span></td> </span></td>

View File

@ -431,7 +431,7 @@
<td> <td>
<table width="630px" border="0"> <table width="630px" border="0">
<tr> <tr>
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), open_source_project_relative_memo_path(open_source_project, topic) %></td> <td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), topic.url %></td>
<td align="right" rowspan="3"> <td align="right" rowspan="3">
<table class="borad-count"> <table class="borad-count">
<tr> <tr>

View File

@ -0,0 +1,5 @@
class AddTopicResourceToRelativeMemo < ActiveRecord::Migration
def change
add_column :relative_memos, :topic_resource, :string
end
end

View File

@ -0,0 +1,10 @@
class CreateBugToOsps < ActiveRecord::Migration
def change
create_table :bug_to_osps do |t|
t.integer :osp_id
t.integer :relative_memo_id
t.string :description
t.timestamps
end
end
end

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20140519074133) do ActiveRecord::Schema.define(:version => 20140522025721) do
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -121,6 +121,14 @@ ActiveRecord::Schema.define(:version => 20140519074133) do
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id" add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
add_index "boards", ["project_id"], :name => "boards_project_id" add_index "boards", ["project_id"], :name => "boards_project_id"
create_table "bug_to_osps", :force => true do |t|
t.integer "osp_id"
t.integer "relative_memo_id"
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "changes", :force => true do |t| create_table "changes", :force => true do |t|
t.integer "changeset_id", :null => false t.integer "changeset_id", :null => false
t.string "action", :limit => 1, :default => "", :null => false t.string "action", :limit => 1, :default => "", :null => false
@ -699,6 +707,7 @@ ActiveRecord::Schema.define(:version => 20140519074133) do
t.string "username" t.string "username"
t.string "userhomeurl" t.string "userhomeurl"
t.date "date_collected" t.date "date_collected"
t.string "topic_resource"
end end
create_table "repositories", :force => true do |t| create_table "repositories", :force => true do |t|
@ -787,6 +796,7 @@ ActiveRecord::Schema.define(:version => 20140519074133) do
t.integer "softapplication_id" t.integer "softapplication_id"
t.integer "is_public" t.integer "is_public"
t.string "application_developers" t.string "application_developers"
t.string "deposit_project_url"
t.string "deposit_project" t.string "deposit_project"
end end

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

@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

View File

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