<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%> |
diff --git a/app/views/layouts/base_opensource_p.html.erb b/app/views/layouts/base_opensource_p.html.erb
new file mode 100644
index 000000000..da743f3a9
--- /dev/null
+++ b/app/views/layouts/base_opensource_p.html.erb
@@ -0,0 +1,161 @@
+<% @nav_dispaly_project_label = 1 %>
+
+
+
+
+ <%= h html_title %>
+
+
+ <%= csrf_meta_tag %>
+ <%= favicon %>
+ <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
+ <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
+ <%= javascript_heads %>
+ <%= heads_for_theme %>
+ <%= call_hook :view_layouts_base_html_head %>
+ <%= javascript_include_tag "ckeditor/ckeditor.js" %>
+
+ <%= yield :header_tags -%>
+
+
+
+
+
+
+ <%= render :partial => 'layouts/base_header'%>
+
+
+
+
+ 开源项目社区 |
+ <%= l(:label_user_location) %> : |
+
+
+ <%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
+ <%= text_field_tag 'name', params[:name], :size => 20 %>
+ <%= hidden_field_tag 'project_type', params[:project_type] %>
+ <%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
+ <% end %>
+ |
+
+
+ <%= link_to request.host()+"/open_source_projects", :controller => 'open_source_projects', :action => 'index' %> |
+ <%= link_to l(:field_homepage), home_path %> > <%= link_to "开源项目社区", :controller => 'open_source_projects', :action => 'index' %> > <%=link_to @open_source_project.name, open_source_project_path(@open_source_project) %> |
+
+
+
+
+
+
+ <%#=
+
+ %>
+ <%= render_flash_messages %>
+ <%= yield %>
+ <%= call_hook :view_layouts_base_content %>
+
+
+ <%= render :partial => 'layouts/base_footer'%>
+
+
+
+ <%= l(:label_loading) %>
+
+
+
+
+ <%= call_hook :view_layouts_base_body_bottom %>
+
+
+
+
diff --git a/app/views/no_uses/_form.html.erb b/app/views/no_uses/_form.html.erb
new file mode 100644
index 000000000..0bcedb031
--- /dev/null
+++ b/app/views/no_uses/_form.html.erb
@@ -0,0 +1,17 @@
+<%= form_for(@no_use) do |f| %>
+ <% if @no_use.errors.any? %>
+
+ <%= pluralize(@no_use.errors.count, "error") %> prohibited this no_use from being saved:
+
+
+ <% @no_use.errors.full_messages.each do |msg| %>
+ - <%= msg %>
+ <% end %>
+
+
+ <% end %>
+
+
+ <%= f.submit %>
+
+<% end %>
diff --git a/app/views/no_uses/_set_no_use.js.erb b/app/views/no_uses/_set_no_use.js.erb
new file mode 100644
index 000000000..fa0c5a8e8
--- /dev/null
+++ b/app/views/no_uses/_set_no_use.js.erb
@@ -0,0 +1,2 @@
+<% selector = ".#{no_use_css(objects)}" %>
+$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript no_use_link(objects, user) %>")});
diff --git a/app/views/no_uses/edit.html.erb b/app/views/no_uses/edit.html.erb
new file mode 100644
index 000000000..d7a0ea439
--- /dev/null
+++ b/app/views/no_uses/edit.html.erb
@@ -0,0 +1,6 @@
+Editing no_use
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @no_use %> |
+<%= link_to 'Back', no_uses_path %>
diff --git a/app/views/no_uses/index.html.erb b/app/views/no_uses/index.html.erb
new file mode 100644
index 000000000..5535d74c1
--- /dev/null
+++ b/app/views/no_uses/index.html.erb
@@ -0,0 +1,21 @@
+Listing no_uses
+
+
+
+ |
+ |
+ |
+
+
+<% @no_uses.each do |no_use| %>
+
+ <%= link_to 'Show', no_use %> |
+ <%= link_to 'Edit', edit_no_use_path(no_use) %> |
+ <%= link_to 'Destroy', no_use, method: :delete, data: { confirm: 'Are you sure?' } %> |
+
+<% end %>
+
+
+
+
+<%= link_to 'New No use', new_no_use_path %>
diff --git a/app/views/no_uses/new.html.erb b/app/views/no_uses/new.html.erb
new file mode 100644
index 000000000..fb295879c
--- /dev/null
+++ b/app/views/no_uses/new.html.erb
@@ -0,0 +1,5 @@
+New no_use
+
+<%= render 'form' %>
+
+<%= link_to 'Back', no_uses_path %>
diff --git a/app/views/no_uses/show.html.erb b/app/views/no_uses/show.html.erb
new file mode 100644
index 000000000..1e580700c
--- /dev/null
+++ b/app/views/no_uses/show.html.erb
@@ -0,0 +1,5 @@
+<%= notice %>
+
+
+<%= link_to 'Edit', edit_no_use_path(@no_use) %> |
+<%= link_to 'Back', no_uses_path %>
diff --git a/app/views/open_source_projects/_form.html.erb b/app/views/open_source_projects/_form.html.erb
new file mode 100644
index 000000000..3949754ac
--- /dev/null
+++ b/app/views/open_source_projects/_form.html.erb
@@ -0,0 +1,21 @@
+<%= form_for(@open_source_project) do |f| %>
+ <% if @open_source_project.errors.any? %>
+
+ <%= pluralize(@open_source_project.errors.count, "error") %> prohibited this open_source_project from being saved:
+
+
+ <% @open_source_project.errors.full_messages.each do |msg| %>
+ - <%= msg %>
+ <% end %>
+
+
+ <% end %>
+
+
+ <%= f.label :String %>
+ <%= f.text_field :String %>
+
+
+ <%= f.submit %>
+
+<% end %>
diff --git a/app/views/open_source_projects/_os_project.html.erb b/app/views/open_source_projects/_os_project.html.erb
new file mode 100644
index 000000000..cae5b963b
--- /dev/null
+++ b/app/views/open_source_projects/_os_project.html.erb
@@ -0,0 +1,68 @@
+
+
+
+ <%= image_tag('../images/avatars/Project/0', :class => 'avatar2') %>
+
+
+
+ <%= textilizable(project.short_description, :project => project) %>
+
+
+
+
+
+
+
+
+
+
+ <%= content_tag('span', "#{l(:default_role_manager)}: ") %>
+
+
+
+ <%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(project.created_at)) %>
+
+
+
+
+
+ <%= content_tag('span', "项目来源:")%><%= link_to project.url, project.url %>
+
+
+ <%= content_tag('span', "数据更新时间:") %><%= content_tag('span', project.date_collected) %>
+
+
+
diff --git a/app/views/open_source_projects/_show_topics.html.erb b/app/views/open_source_projects/_show_topics.html.erb
new file mode 100644
index 000000000..3ede2730e
--- /dev/null
+++ b/app/views/open_source_projects/_show_topics.html.erb
@@ -0,0 +1,67 @@
+
+
+
+ 共有 <%= link_to memos.count %> 个贴子
+
+
+ <% if memos.any? %>
+ <% memos.each do |topic| %>
+
+
+ <%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
+ <%= image_tag('../images/avatars/User/0', :class => "avatar") unless topic.author%> |
+
+
+
+ <%= link_to h(topic.subject), open_source_project_relative_memo_path(topic.open_source_project, topic) %> |
+
+
+
+ <%= link_to (topic.replies_count), open_source_project_relative_memo_path(topic.open_source_project, topic) %> |
+
+
+ 回答 |
+
+ |
+
+
+
+ <%= link_to (topic.viewed_count_crawl+topic.viewed_count_local), open_source_project_relative_memo_path(topic.open_source_project, topic) %> |
+
+
+ 浏览 |
+
+ |
+
+
+ |
+
+
+ <%#= authoring topic.created_at, topic.author %>
+
+ |
+
+
+ 帖子来源:<%= link_to topic.url, topic.url%> |
+ <%= no_use_link(topic, User.current) %> |
+
+
+ <%= image_tag( "/images/sidebar/tags.png") %>
+ <%= render :partial => 'tags/tag_name', :locals => {:obj => topic,:object_flag => "9",:non_list_all => true }%> |
+
+
+ |
+
+
+
+
+ <% end %>
+
+ <% else %>
+
+ <%= l(:label_no_data) %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/open_source_projects/edit.html.erb b/app/views/open_source_projects/edit.html.erb
new file mode 100644
index 000000000..bbe64cba8
--- /dev/null
+++ b/app/views/open_source_projects/edit.html.erb
@@ -0,0 +1,6 @@
+Editing open_source_project
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @open_source_project %> |
+<%= link_to 'Back', open_source_projects_path %>
diff --git a/app/views/open_source_projects/index.html.erb b/app/views/open_source_projects/index.html.erb
new file mode 100644
index 000000000..0e9f1008a
--- /dev/null
+++ b/app/views/open_source_projects/index.html.erb
@@ -0,0 +1,238 @@
+
+ <%= form_tag(:controller => 'open_source_projects', :action => "search", :method => :get) do %>
+
+ <% end %>
+
+
+<%#======================================================================box before%>
+
+
+
+
+
+
+
+
+ - 查找条件>
+
+ -
+
+ <%= show_condition(@app_dir, @language, @created_at, params[:name]) %>
+
+
+ - 共 <%= @os_project_count %> 个开源项目
+
+
+
+
+
+
+
+
+
+ 应用方向:
+ <%= link_to "操作系统相关", open_source_projects_path(:app_dir => "操作系统相关", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "管理和监控", open_source_projects_path(:app_dir => "管理和监控", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "游戏/娱乐", open_source_projects_path(:app_dir => "游戏/娱乐", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "应用工具", open_source_projects_path(:app_dir => "应用工具", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "数据库相关", open_source_projects_path(:app_dir => "数据库相关", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "服务器软件", open_source_projects_path(:app_dir => "服务器软件", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "网站系统", open_source_projects_path(:app_dir => "网站系统", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "插件和扩展", open_source_projects_path(:app_dir => "插件和扩展", :language => @language, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+
+
+
+
+ 开发语言:
+ <%= link_to "JAVA", open_source_projects_path(:language => "JAVA", :app_dir => @app_dir, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "C++", open_source_projects_path(:language => "c++", :app_dir => @app_dir, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "C", open_source_projects_path(:language => "c", :app_dir => @app_dir, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "C#", open_source_projects_path(:language => "c#", :app_dir => @app_dir, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "ruby", open_source_projects_path(:language => "ruby", :app_dir => @app_dir, :created_at => @created_at, :name => params[:name]), :class => "nav-more J_More show" %>
+ <%#= link_to "其他", open_source_projects_path(:language => "其他", :app_dir => @app_dir, :created_at => @created_at), :class => "nav-more J_More show" %>
+
+
+
+
+
+ 创立时间:
+ <%= link_to "2014", open_source_projects_path(:app_dir => @app_dir, :language => @language, :created_at => "2014", :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "2013", open_source_projects_path(:app_dir => @app_dir, :language => @language, :created_at => "2013", :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "2012", open_source_projects_path(:app_dir => @app_dir, :language => @language, :created_at => "2012", :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "2011", open_source_projects_path(:app_dir => @app_dir, :language => @language, :created_at => "2011", :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "2010", open_source_projects_path(:app_dir => @app_dir, :language => @language, :created_at => "2010", :name => params[:name]), :class => "nav-more J_More show" %>
+ <%= link_to "更早", open_source_projects_path(:app_dir => @app_dir, :language => @language, :created_at => "更早", :name => params[:name]), :class => "nav-more J_More show" %>
+
+
+
+
+
+
+
+
+
+
+<%#======================================================================box after%>
+
+
+
+
+ <% @open_source_projects.each do |project| %>
+ -
+
+ <%= link_to project.name, open_source_project_path(project), :class=>"project root leaf"%>
+
+ <%= render :partial => 'open_source_projects/os_project', :locals => {:project => project}%>
+
+
+ <% end %>
+
+
+
+
+
+<% html_title(l(:label_project_plural)) -%>
+
diff --git a/app/views/open_source_projects/master_apply.html.erb b/app/views/open_source_projects/master_apply.html.erb
new file mode 100644
index 000000000..0288692fc
--- /dev/null
+++ b/app/views/open_source_projects/master_apply.html.erb
@@ -0,0 +1,84 @@
+
+
\ No newline at end of file
diff --git a/app/views/open_source_projects/new.html.erb b/app/views/open_source_projects/new.html.erb
new file mode 100644
index 000000000..66de0a3f9
--- /dev/null
+++ b/app/views/open_source_projects/new.html.erb
@@ -0,0 +1,5 @@
+New open_source_project
+
+<%= render 'form' %>
+
+<%= link_to 'Back', open_source_projects_path %>
diff --git a/app/views/open_source_projects/show.html.erb b/app/views/open_source_projects/show.html.erb
new file mode 100644
index 000000000..0459e2399
--- /dev/null
+++ b/app/views/open_source_projects/show.html.erb
@@ -0,0 +1,54 @@
+
+
+ <%=l(:label_memo_new)%>
+ <% if User.current.logged? %>
+ <%= labelled_form_for(@memo, :url => open_source_project_relative_memos_path(@open_source_project), :html => {:multipart => true} ) do |f| %>
+ <% if @memo.errors.any? %>
+
+ <%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:
+
+
+ <% @memo.errors.full_messages.each do |msg| %>
+ - <%= msg %>
+ <% end %>
+
+
+ <% end %>
+
+ <%= f.text_field :subject, :required => true%>
+ <%= f.text_area :content, :required => true, :id => 'editor02' %>
+
+
+
+ <%#= l(:label_attachment_plural) %>
+ <%#= render :partial => 'attachments/form', :locals => {:container => @memo} %>
+
+ <%= f.submit :value => l(:label_memo_create) %>
+ <%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
+
+ <% end %>
+<% end %>
+
+
+<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
+
+ <%= link_to l(:label_memo_new_from_forum), new_open_source_project_relative_memo_path(@open_source_project), :class => 'icon icon-add',
+ :onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
+
+
+
+ <%#= link_to(
+ image_tag('edit.png')+l(:label_forum_edit),
+ {:action => 'edit', :id => @forum},
+ :method => 'get',
+ :title => l(:button_edit)
+ ) if @forum.editable_by?(User.current) %>
+ <%#= link_to(
+ image_tag('delete.png')+'删除讨论区',
+ {:action => 'destroy', :id => @forum},
+ :method => :delete,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete)
+ ) if @forum.destroyable_by?(User.current) %>
+
+<%= render :partial => 'open_source_projects/show_topics', :locals => {:memos => @memos} %>
diff --git a/app/views/relative_memos/_reply_box.html.erb b/app/views/relative_memos/_reply_box.html.erb
new file mode 100644
index 000000000..98f1f31a0
--- /dev/null
+++ b/app/views/relative_memos/_reply_box.html.erb
@@ -0,0 +1,14 @@
+<%= form_for(@mome_new, url: open_source_project_relative_memos_path, :html => {:multipart => true}) do |f| %>
+ <%= f.hidden_field :subject, :required => true, value: @memo.subject %>
+ <%= f.hidden_field :osp_id, :required => true, value: @memo.osp_id %>
+ <%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
+ <%= label_tag(l(:label_reply_plural)) %>:
+
+ <%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %>
+
+
+ <%#= l(:label_attachment_plural) %>
+ <%#= render :partial => 'attachments/form' %>
+
+ <%= f.submit value: l(:label_reply_plural), class: "replies" %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/relative_memos/show.html.erb b/app/views/relative_memos/show.html.erb
new file mode 100644
index 000000000..2d85a19aa
--- /dev/null
+++ b/app/views/relative_memos/show.html.erb
@@ -0,0 +1,164 @@
+
+
+
+ <% if @memo.author%>
+ <%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>
+ <% else %>
+ <%= image_tag('../images/avatars/User/0', :class => "avatar") %>
+ <% end %>
+ <%=link_to @memo.author.name, user_path(@memo.author) if @memo.author%>
+
+
+
+
+ <%#= link_to(
+ l(:button_quote),
+ {:action => 'quote', :id => @memo},
+ :remote => true,
+ :method => 'get',
+ :title => l(:button_quote)
+ )if !@memo.locked? && User.current.logged? %>
+
+ <%#= link_to(
+ image_tag('edit.png'),
+ {:action => 'edit', :id => @memo},
+ :method => 'get',
+ :title => l(:button_edit)
+ ) if @memo.editable_by?(User.current) %>
+
+ <%#= link_to(
+ l(:button_delete),
+ {:action => 'destroy', :id => @memo},
+ :method => :delete,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete)
+ ) if @memo.destroyable_by?(User.current) %>
+
+
+ <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
+
+
+ <%= raw @memo.content %>
+
+ <% if @memo.attachments.any?%>
+ <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
+ <%= render :partial => 'attachments/links', :locals => {:attachments => @memo.attachments, :options => options} %>
+ <% end %>
+
+
+
+ <% if @memo.author %>
+ <%= authoring @memo.created_at, @memo.author.name %>
+ <% else %>
+ <%= added_time @memo.created_at %>
+ <% end %>
+
+
+
+
+
+
+ <% pages_count = @reply_pages.offset %>
+ <% @replies.each do |reply| %>
+ ">
+ <%= pages_count += 1 %>楼 :
+
+
+ <%#= link_to(
+ l(:button_quote),
+ {:action => 'quote', :id => reply},
+ :remote => true,
+ :method => 'get',
+ :title => l(:button_quote)
+ )if !@memo.locked? && User.current.logged? %>
+
+ <%#= link_to(
+ image_tag('edit.png'),
+ {:action => 'edit', :id => reply},
+ :title => l(:button_edit)
+ ) if reply.editable_by?(User.current) %>
+
+ <%#= link_to(
+ l(:button_delete),
+ {:action => 'destroy', :id => reply},
+ :method => :delete,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete)
+ ) if reply.destroyable_by?(User.current) %>
+
+
+
+
+
+
+ <% if reply.author%>
+ <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
+ <% else %>
+ <%= image_tag('../images/avatars/User/0', :class => "avatar") %>
+ <% end %>
+ |
+
+
+
+
+ <% if reply.author %>
+ <%= authoring reply.created_at, reply.author.name %>
+ <% else %>
+ <%= added_time reply.created_at %>
+ <% end %> |
+
+
+
+ <% end %>
+
+
+
+<% if User.current.login? %>
+
+ <%= render :partial => 'relative_memos/reply_box' %>
+
+<% else %>
+
+ <%= l(:label_user_login_tips) %>
+ <%= link_to l(:label_user_login_new), signin_path %>
+
+
+<% end %>
diff --git a/app/views/tags/_show_open_source_projects.html.erb b/app/views/tags/_show_open_source_projects.html.erb
new file mode 100644
index 000000000..2c8bc6374
--- /dev/null
+++ b/app/views/tags/_show_open_source_projects.html.erb
@@ -0,0 +1,15 @@
+
+<% if projects_results.size > 0 %>
+
+<% projects_results.each do |prj| %>
+
+
+ <%= l(:label_tags_project_name) %><%= link_to "#{prj.name}",:controller => "open_source_projects",:action => "show",:id => prj.id %>
+
+ <%= l(:label_tags_project_description) %><%= prj.short_description %>
+
+
+
+<% end %>
+<% end %>
+
diff --git a/app/views/tags/_tag.html.erb b/app/views/tags/_tag.html.erb
index 1cec18b37..205143924 100644
--- a/app/views/tags/_tag.html.erb
+++ b/app/views/tags/_tag.html.erb
@@ -7,6 +7,8 @@
5 代表是forum类型
6 代表是Attachment类型
7 代表是contest类型
+ 8 代表是OpenSourceProject类型
+ 9 代表是RelativeMemo类型
#end%>
<% if object_flag == '3' %>
diff --git a/app/views/tags/_tag_search_results.html.erb b/app/views/tags/_tag_search_results.html.erb
index 49a5bcd82..1ea452dec 100644
--- a/app/views/tags/_tag_search_results.html.erb
+++ b/app/views/tags/_tag_search_results.html.erb
@@ -22,6 +22,10 @@
<% when show_flag == '7'%>
<%= l(:label_contest_innovate)%>(<%= @results_count %>)
<%= render :partial => "show_contests",:locals => {:contests_results => contests_results}%>
+ <% when show_flag == '8'%>
+ <%#= l(:label_attachment)%>
+ 开源项目:(<%= @results_count %>)
+ <%= render :partial => "show_open_source_projects",:locals => {:projects_results => open_source_projects_results}%>
<% else %>
<%= l(:label_tags_all_objects)%>
diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb
index 48ba53d88..c74721c3e 100644
--- a/app/views/tags/index.html.erb
+++ b/app/views/tags/index.html.erb
@@ -22,7 +22,8 @@
<%= l(:label_project_plural) %>(<%= @projects_tags_num %>) |
<%= l(:label_user_plural) %>(<%= @users_tags_num %>) |
<%= l(:label_tags_call)%>(<%= @bids_tags_num %>) |
- <%= l(:field_filename)%>(<%= @attachments_tags_num %>)
+ <%= l(:field_filename)%>(<%= @attachments_tags_num %>) |
+ 开源项目(<%= @open_source_projects_num %>)
<%= l(:label_tags_contest)%>(<%= @contests_tags_num %>) |
@@ -35,6 +36,7 @@
:forums_results => @forums_results,
:attachments_results=> @attachments_results,
:contests_results => @contests_results,
+ :open_source_projects_results => @open_source_projects_results,
:show_flag => @obj_flag}
%>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 15cd1dca4..26d3f6682 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -832,6 +832,7 @@ zh:
label_feeds_access_key_created_on: "RSS存取键是在 %{value} 之前建立的"
label_module_plural: 模块
label_added_time_by: "由 %{author} 在 %{age} 之前添加"
+ label_added_time: "在 %{age} 之前添加"
label_updated_time: " 更新于 %{value} 之前"
label_updated_time_by: "由 %{author} 更新于 %{age} 之前"
label_jump_to_a_project: 选择一个项目...
@@ -1821,7 +1822,12 @@ zh:
label_contest_reason: 参赛宣言:
label_notification: 通知
label_sumbit_empty: 搜索内容不能为空
-
+ no_use: 没有帮助
+ cancel_no_use: 撤销没有帮助
+ cancel_apply: 取消申请
+ apply_master: 申请成为版主
+ you_are_master: 您是该项目的版主
+
#add by linchun (竞赛相关)
label_upload_files: 上传文件
label_upload_softwarepackage: 上传软件包
diff --git a/config/routes.rb b/config/routes.rb
index cfbcbe746..be0d11cea 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -16,54 +16,73 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
RedmineApp::Application.routes.draw do
- mount SeemsRateable::Engine => '/rateable', :as => :rateable
-
- namespace :zipdown do
- match 'assort'
- end
- namespace :test do
- match 'courselist'
- match 'zip'
- end
- ##new added by linchun #以发布应用的形式参与竞赛
- resources :softapplications do
-
- collection do
- match 'new_message', via: :get
- end
- member do
- match 'create_message' , via: :post
- end
- end
-
- ## new added by linchun #新竞赛相关
- resources :contests, only: [:index] do
- collection do
- match 'new_contest' , via: :get
- match 'join_in_contest' , via: :post
- match 'unjoin_in_contest' , via: :delete
- match 'create_contest' , via: :post
- match 'new_join' , via: :post
- match 'new' , via: :post
- end
- member do
- match 'add_softapplication'
- match 'update_contest' , via: [:put]
- match 'show_contest' , via: :get
- match 'show_project' , via: :get
- match 'show_softapplication', via: :get
- match 'show_participator' , via: :get
- match 'add' , via: [:get, :post]
- match 'add_softapplication' , via: [:get, :post]
- match 'create' , via: :post
- match 'settings' , via: [:get, :post]
- end
- end
-
+ resources :no_uses
+ delete 'no_uses', :to => 'no_uses#delete'
+
+ resources :apply_project_masters
+ delete 'apply_project_masters', :to => 'apply_project_masters#delete'
+
+
+ resources :open_source_projects do
+ collection do
+ match 'search', via: [:get, :post]
+ match 'remove_condition', via: [:get, :post]
+ end
+ resources :relative_memos
+ member do
+ match 'master_apply', via: [:get, :post]
+ match 'accept_master_apply', via: [:get, :post]
+ match 'refuse_master_apply', via: [:get, :post]
+ end
+ end
+ mount SeemsRateable::Engine => '/rateable', :as => :rateable
+
+ namespace :zipdown do
+ match 'assort'
+ end
+ namespace :test do
+ match 'courselist'
+ match 'zip'
+ end
+ ##new added by linchun #以发布应用的形式参与竞赛
+ resources :softapplications do
+
+ collection do
+ match 'new_message', via: :get
+ end
+ member do
+ match 'create_message' , via: :post
+ end
+ end
+
+ ## new added by linchun #新竞赛相关
+ resources :contests, only: [:index] do
+ collection do
+ match 'new_contest' , via: :get
+ match 'join_in_contest' , via: :post
+ match 'unjoin_in_contest' , via: :delete
+ match 'create_contest' , via: :post
+ match 'new_join' , via: :post
+ match 'new' , via: :post
+ end
+ member do
+ match 'add_softapplication'
+ match 'update_contest' , via: [:put]
+ match 'show_contest' , via: :get
+ match 'show_project' , via: :get
+ match 'show_softapplication', via: :get
+ match 'show_participator' , via: :get
+ match 'add' , via: [:get, :post]
+ match 'add_softapplication' , via: [:get, :post]
+ match 'create' , via: :post
+ match 'settings' , via: [:get, :post]
+ end
+ end
+
resources :stores do
collection do
match 'search', via: [:get, :post]
- end
+ end
end
resources :forums do
@@ -81,21 +100,20 @@ RedmineApp::Application.routes.draw do
end
end
+ resources :shares
- resources :shares
-
#added by william
get "tags/index"
-
+
get "tags/show"
-
+
get "praise_tread/praise_plus"
get "praise_tread/tread_plus"
#end
root :to => 'welcome#index', :as => 'home'
-
+
#added by baiyu
match 'git_usage/ch_usage', :controller => 'git_usage', :action => 'ch_usage', :via => :get, :as => 'ch_usage'
match 'git_usage/en_usage', :controller => 'git_usage', :action => 'en_usage', :via => :get, :as => 'en_usage'
@@ -140,7 +158,6 @@ RedmineApp::Application.routes.draw do
match '/journals/edit/:id', :to => 'journals#edit', :id => /\d+/, :via => [:get, :post]
match '/journals/destroy/:id', :to => 'journals#destroy', :id => /\d+/, :via => [:get, :post]
-
get '/projects/:project_id/issues/gantt', :to => 'gantts#show', :as => 'project_gantt'
get '/issues/gantt', :to => 'gantts#show'
@@ -150,21 +167,21 @@ RedmineApp::Application.routes.draw do
get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report'
get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details'
post '/users/:id/user_activities', :to => 'users#show', :as => "user_activities"
-
+
#added by young
- resources :users do
+ resources :users do
member do
match 'user_projects', :to => 'users#user_projects', :via => :get
match 'user_activities', :to => 'users#show', :via => :get, :as => "user_activities"
- match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
- match 'watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
+ match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
+ match 'watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info'
match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang
match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang
match 'user_courses', :to => 'users#user_courses', :via => :get
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
- match 'watch_projects', :to => 'users#watch_projects', :via => :get
- # added by bai
+ match 'watch_projects', :to => 'users#watch_projects', :via => :get
+ # added by bai
match 'show_score', :to => 'users#show_score', :via => :get
match 'topic_score_index', :controller => 'users', :action => 'topic_score_index', :via => [:get, :post]
match 'project_score_index', :to => 'users#project_score_index', :via => :get
@@ -178,13 +195,13 @@ RedmineApp::Application.routes.draw do
match 'file_score_index', :to => 'projects#file_score_index', :via => [:get, :post]
match 'code_submit_score_index', :to => 'projects#code_submit_score_index', :via => [:get, :post]
match 'projects_topic_score_index', :to => 'projects#projects_topic_score_index', :via => [:get, :post]
- # end
+ # end
end
end
match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback"
match 'users/:id/user_projects', :controller => 'users', :action => 'user_projects', :via => :get
- #match 'user/:id/watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
-
+ #match 'user/:id/watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
+
#end
match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post]
match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post]
@@ -244,7 +261,6 @@ RedmineApp::Application.routes.draw do
post 'reopen'
match 'copy', :via => [:get, :post]
end
-
#by young
match '/member', :controller => 'projects', :action => 'member', :as => 'member', :via => :get
@@ -253,7 +269,6 @@ RedmineApp::Application.routes.draw do
# match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
match '/homework', :controller => 'projects', :action => 'homework', :as => 'homework', :via => :get
-
# match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get
# match '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get
# match '/', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
@@ -261,7 +276,7 @@ RedmineApp::Application.routes.draw do
# get 'projects/:project_id/repository', :to => 'repositories#show', :as => 'project_repository'
# match '/show', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
- match '/watcherlist', :controller=>'projects', :action=> 'watcherlist', :as => 'watcherlist', :via => :get #add by huang
+ match '/watcherlist', :controller=>'projects', :action=> 'watcherlist', :as => 'watcherlist', :via => :get #add by huang
# matche '/news', :controller => 'news', :action => 'index', :as => 'news', :via => :get
#end
@@ -311,7 +326,7 @@ RedmineApp::Application.routes.draw do
resources :repositories, :except => [:index, :show] do
member do
get 'newrepo', :via => [:get, :post]
- # get 'create', :via=>[:get, :post]
+ # get 'create', :via=>[:get, :post]
end
end
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
@@ -488,8 +503,6 @@ RedmineApp::Application.routes.draw do
get 'autocomplete_for_new_user'
end
end
-
-
match 'workflows', :controller => 'workflows', :action => 'index', :via => :get
match 'workflows/edit', :controller => 'workflows', :action => 'edit', :via => [:get, :post]
@@ -505,10 +518,10 @@ RedmineApp::Application.routes.draw do
match 'uploads', :to => 'attachments#upload', :via => :post
# Added by Tao
- match 'upload_avatar', :to => 'avatar#upload', :via => :post
+ match 'upload_avatar', :to => 'avatar#upload', :via => :post
# Endof Tao's code
get 'robots.txt', :to => 'welcome#robots'
-
+
##############测试留言功能 fq
post 'words/new', :to => 'words#new'
post 'words/create', :to => 'words#create'
@@ -532,7 +545,7 @@ RedmineApp::Application.routes.draw do
match 'calls/:id/new_submit_homework', to: 'bids#new_submit_homework', via: :get, as: 'new_submit_homework'
match 'words/add_project_respond', :controller => 'words', :action => 'add_project_respond'
match 'words/:id/leave_project_message', :controller => 'words', :action => 'leave_project_message'
-
+
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
match 'calls/create_bid', :to => 'bids#create_bid'
match 'contest/create_contest', :to => 'bids#create_contest' #huang
@@ -546,24 +559,24 @@ RedmineApp::Application.routes.draw do
match 'calls/:id/show_course', :to => 'bids#show_course', :as => 'show_course'
match 'calls/:id/show_bid_project', :to => 'bids#show_bid_project', :as => 'show_bid_project'
match 'calls/:id/show_bid_user', :to => 'bids#show_bid_user', :as => 'show_bid_user'
-
+
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
-
- post 'join_in/join', :to => 'courses#join', :as => 'join'
+
+ post 'join_in/join', :to => 'courses#join', :as => 'join'
delete 'join_in/join', :to => 'courses#unjoin'
post 'calls/:id/join_in_contest', :to => 'bids#join_in_contest', :as => 'join_in_contest'
delete 'calls/:id/join_in_contest', :to => 'bids#unjoin_in_contest'
match 'calls/:id/show_participator', :to => 'bids#show_participator' #bai
match 'calls/:id/update_contest', :to => 'bids#update_contest' #bai
match 'calls/:id/settings', :to => 'bids#settings' #bai
-
+
delete 'attachment/:id', :to => 'attachments#delete_homework'
match 'new_join', :to => 'projects#new_join', :as => 'try_join'
match 'new_join_in_contest', :to => 'bids#new_join', :as => 'try_join_in_contest'
match 'projects/:id/respond', :to => 'projects#project_respond', :via => :post
match 'calls/:id/manage',:to => 'bids#manage',:via => [:get,:post]
match 'project/course', :to => 'projects#course', :as => 'course'
-
+
#added by william
# match 'calls/:id/set_results',:controller => 'bids', :action => 'set_results',:via => [:get,:post],:as => 'set_results'
# match 'calls/:id/set_prizes',:controller => 'bids',:action => 'set_prizes',:as => 'set_prizes'
@@ -571,10 +584,10 @@ RedmineApp::Application.routes.draw do
# added by young
match 'calls', :controller => 'bids', :action => 'index'
-
+
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
-
+
########################
##added by wen##########
@@ -603,7 +616,7 @@ RedmineApp::Application.routes.draw do
match 'parise_tread/tread_plus',:to => 'parise_tread#tread_plus',:as=>"tread"
match 'tags/delete',:to=>'tags#delete'
match 'tags/remove_tag',:to=>'tags#remove_tag',:as=>"remove_tag"
-
+
match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution'
Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir|
diff --git a/db/migrate/20140324015819_create_open_source_projects.rb b/db/migrate/20140324015819_create_open_source_projects.rb
new file mode 100644
index 000000000..22034c3bb
--- /dev/null
+++ b/db/migrate/20140324015819_create_open_source_projects.rb
@@ -0,0 +1,15 @@
+class CreateOpenSourceProjects < ActiveRecord::Migration
+ def change
+ create_table :open_source_projects do |t|
+ t.column "name", :string, :default => nil, :null => true
+ t.column "description", :string, :default => '', :null => true
+ t.column "commit_count", :integer, :default => 0
+ t.column "code_line", :integer, :default => 0
+ t.column "users_count",:integer, :default => 0
+ t.column "last_commit_time", :date, :null => true
+ t.column "url", :string, :default => nil, :null => true
+ t.column "date_collected", :date, :null => true
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140401004102_create_relative_memos.rb b/db/migrate/20140401004102_create_relative_memos.rb
new file mode 100644
index 000000000..6654b8fe5
--- /dev/null
+++ b/db/migrate/20140401004102_create_relative_memos.rb
@@ -0,0 +1,18 @@
+class CreateRelativeMemos < ActiveRecord::Migration
+ def change
+ create_table :relative_memos do |t|
+ t.integer :osp_id, :null => false
+ t.integer :parent_id, null: true
+ t.string :subject, null: false
+ t.text :content, null: false
+ t.integer :author_id
+ t.integer :replies_count, default: 0
+ t.integer :last_reply_id
+ t.boolean :lock, default: false
+ t.boolean :sticky, default: false
+ t.boolean :is_quote, default: false
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140403075029_create_apply_project_masters.rb b/db/migrate/20140403075029_create_apply_project_masters.rb
new file mode 100644
index 000000000..5124dbc15
--- /dev/null
+++ b/db/migrate/20140403075029_create_apply_project_masters.rb
@@ -0,0 +1,12 @@
+class CreateApplyProjectMasters < ActiveRecord::Migration
+ def change
+ create_table :apply_project_masters do |t|
+ t.integer :user_id
+ t.string :apply_type
+ t.integer :apply_id
+ t.integer :status
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140403113341_create_no_uses.rb b/db/migrate/20140403113341_create_no_uses.rb
new file mode 100644
index 000000000..56056b07d
--- /dev/null
+++ b/db/migrate/20140403113341_create_no_uses.rb
@@ -0,0 +1,11 @@
+class CreateNoUses < ActiveRecord::Migration
+ def change
+ create_table :no_uses do |t|
+ t.integer :user_id, :null => false
+ t.string :no_use_type
+ t.integer :no_use_id
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140404031622_add_view_count_to_relative_memos.rb b/db/migrate/20140404031622_add_view_count_to_relative_memos.rb
new file mode 100644
index 000000000..17eb95b70
--- /dev/null
+++ b/db/migrate/20140404031622_add_view_count_to_relative_memos.rb
@@ -0,0 +1,6 @@
+class AddViewCountToRelativeMemos < ActiveRecord::Migration
+ def change
+ add_column :relative_memos, :viewed_count_crawl, :int, default: 0
+ add_column :relative_memos, :viewed_count_local, :int, default: 0
+ end
+end
diff --git a/db/migrate/20140411011700_change_description_type_to_open_source_project.rb b/db/migrate/20140411011700_change_description_type_to_open_source_project.rb
new file mode 100644
index 000000000..8c8804d8a
--- /dev/null
+++ b/db/migrate/20140411011700_change_description_type_to_open_source_project.rb
@@ -0,0 +1,9 @@
+class ChangeDescriptionTypeToOpenSourceProject < ActiveRecord::Migration
+ def up
+ change_column :open_source_projects, :description, :text
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20140428005537_add_url_to_relative_memos.rb b/db/migrate/20140428005537_add_url_to_relative_memos.rb
new file mode 100644
index 000000000..d339605c1
--- /dev/null
+++ b/db/migrate/20140428005537_add_url_to_relative_memos.rb
@@ -0,0 +1,5 @@
+class AddUrlToRelativeMemos < ActiveRecord::Migration
+ def change
+ add_column :relative_memos, :url, :string
+ end
+end
diff --git a/test/fixtures/activities.yml b/test/fixtures/activities.yml
new file mode 100644
index 000000000..585b0e66f
--- /dev/null
+++ b/test/fixtures/activities.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ act_id:
+ act_type: MyString
+ user_id:
+
+two:
+ act_id:
+ act_type: MyString
+ user_id:
diff --git a/test/fixtures/apply_project_masters.yml b/test/fixtures/apply_project_masters.yml
new file mode 100644
index 000000000..c63aac0b6
--- /dev/null
+++ b/test/fixtures/apply_project_masters.yml
@@ -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
diff --git a/test/fixtures/forums.yml b/test/fixtures/forums.yml
new file mode 100644
index 000000000..c63aac0b6
--- /dev/null
+++ b/test/fixtures/forums.yml
@@ -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
diff --git a/test/fixtures/journal_replies.yml b/test/fixtures/journal_replies.yml
new file mode 100644
index 000000000..1a8bb39c1
--- /dev/null
+++ b/test/fixtures/journal_replies.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ journal_id: 1
+ user_id: 1
+ reply_id: 1
+
+two:
+ journal_id: 1
+ user_id: 1
+ reply_id: 1
diff --git a/test/fixtures/no_uses.yml b/test/fixtures/no_uses.yml
new file mode 100644
index 000000000..c63aac0b6
--- /dev/null
+++ b/test/fixtures/no_uses.yml
@@ -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
diff --git a/test/fixtures/open_source_projects.yml b/test/fixtures/open_source_projects.yml
new file mode 100644
index 000000000..a95f1d28f
--- /dev/null
+++ b/test/fixtures/open_source_projects.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ String:
+
+two:
+ String:
diff --git a/test/fixtures/relative_memos.yml b/test/fixtures/relative_memos.yml
new file mode 100644
index 000000000..c63aac0b6
--- /dev/null
+++ b/test/fixtures/relative_memos.yml
@@ -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
diff --git a/test/functional/apply_project_masters_controller_test.rb b/test/functional/apply_project_masters_controller_test.rb
new file mode 100644
index 000000000..3cad8dca6
--- /dev/null
+++ b/test/functional/apply_project_masters_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class ApplyProjectMastersControllerTest < ActionController::TestCase
+ setup do
+ @apply_project_master = apply_project_masters(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:apply_project_masters)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create apply_project_master" do
+ assert_difference('ApplyProjectMaster.count') do
+ post :create, apply_project_master: { }
+ end
+
+ assert_redirected_to apply_project_master_path(assigns(:apply_project_master))
+ end
+
+ test "should show apply_project_master" do
+ get :show, id: @apply_project_master
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @apply_project_master
+ assert_response :success
+ end
+
+ test "should update apply_project_master" do
+ put :update, id: @apply_project_master, apply_project_master: { }
+ assert_redirected_to apply_project_master_path(assigns(:apply_project_master))
+ end
+
+ test "should destroy apply_project_master" do
+ assert_difference('ApplyProjectMaster.count', -1) do
+ delete :destroy, id: @apply_project_master
+ end
+
+ assert_redirected_to apply_project_masters_path
+ end
+end
diff --git a/test/functional/forums_controller_test.rb b/test/functional/forums_controller_test.rb
new file mode 100644
index 000000000..9b0438bd2
--- /dev/null
+++ b/test/functional/forums_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class ForumsControllerTest < ActionController::TestCase
+ setup do
+ @forum = forums(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:forums)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create forum" do
+ assert_difference('Forum.count') do
+ post :create, forum: { }
+ end
+
+ assert_redirected_to forum_path(assigns(:forum))
+ end
+
+ test "should show forum" do
+ get :show, id: @forum
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @forum
+ assert_response :success
+ end
+
+ test "should update forum" do
+ put :update, id: @forum, forum: { }
+ assert_redirected_to forum_path(assigns(:forum))
+ end
+
+ test "should destroy forum" do
+ assert_difference('Forum.count', -1) do
+ delete :destroy, id: @forum
+ end
+
+ assert_redirected_to forums_path
+ end
+end
diff --git a/test/functional/no_uses_controller_test.rb b/test/functional/no_uses_controller_test.rb
new file mode 100644
index 000000000..255b03dc4
--- /dev/null
+++ b/test/functional/no_uses_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class NoUsesControllerTest < ActionController::TestCase
+ setup do
+ @no_use = no_uses(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:no_uses)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create no_use" do
+ assert_difference('NoUse.count') do
+ post :create, no_use: { }
+ end
+
+ assert_redirected_to no_use_path(assigns(:no_use))
+ end
+
+ test "should show no_use" do
+ get :show, id: @no_use
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @no_use
+ assert_response :success
+ end
+
+ test "should update no_use" do
+ put :update, id: @no_use, no_use: { }
+ assert_redirected_to no_use_path(assigns(:no_use))
+ end
+
+ test "should destroy no_use" do
+ assert_difference('NoUse.count', -1) do
+ delete :destroy, id: @no_use
+ end
+
+ assert_redirected_to no_uses_path
+ end
+end
diff --git a/test/functional/open_source_projects_controller_test.rb b/test/functional/open_source_projects_controller_test.rb
new file mode 100644
index 000000000..9b33a8b1f
--- /dev/null
+++ b/test/functional/open_source_projects_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class OpenSourceProjectsControllerTest < ActionController::TestCase
+ setup do
+ @open_source_project = open_source_projects(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:open_source_projects)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create open_source_project" do
+ assert_difference('OpenSourceProject.count') do
+ post :create, open_source_project: { String: @open_source_project.String }
+ end
+
+ assert_redirected_to open_source_project_path(assigns(:open_source_project))
+ end
+
+ test "should show open_source_project" do
+ get :show, id: @open_source_project
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @open_source_project
+ assert_response :success
+ end
+
+ test "should update open_source_project" do
+ put :update, id: @open_source_project, open_source_project: { String: @open_source_project.String }
+ assert_redirected_to open_source_project_path(assigns(:open_source_project))
+ end
+
+ test "should destroy open_source_project" do
+ assert_difference('OpenSourceProject.count', -1) do
+ delete :destroy, id: @open_source_project
+ end
+
+ assert_redirected_to open_source_projects_path
+ end
+end
diff --git a/test/unit/activity_test.rb b/test/unit/activity_test.rb
new file mode 100644
index 000000000..eddcccdf7
--- /dev/null
+++ b/test/unit/activity_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ActivityTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/apply_project_master_test.rb b/test/unit/apply_project_master_test.rb
new file mode 100644
index 000000000..62309b315
--- /dev/null
+++ b/test/unit/apply_project_master_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ApplyProjectMasterTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/forum_test.rb b/test/unit/forum_test.rb
new file mode 100644
index 000000000..a6f90e493
--- /dev/null
+++ b/test/unit/forum_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ForumTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/helpers/apply_project_masters_helper_test.rb b/test/unit/helpers/apply_project_masters_helper_test.rb
new file mode 100644
index 000000000..f1fbe853b
--- /dev/null
+++ b/test/unit/helpers/apply_project_masters_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class ApplyProjectMastersHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/forums_helper_test.rb b/test/unit/helpers/forums_helper_test.rb
new file mode 100644
index 000000000..deebfb03b
--- /dev/null
+++ b/test/unit/helpers/forums_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class ForumsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/no_uses_helper_test.rb b/test/unit/helpers/no_uses_helper_test.rb
new file mode 100644
index 000000000..405921005
--- /dev/null
+++ b/test/unit/helpers/no_uses_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class NoUsesHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/helpers/open_source_projects_helper_test.rb b/test/unit/helpers/open_source_projects_helper_test.rb
new file mode 100644
index 000000000..8ecd58615
--- /dev/null
+++ b/test/unit/helpers/open_source_projects_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class OpenSourceProjectsHelperTest < ActionView::TestCase
+end
diff --git a/test/unit/journal_reply_test.rb b/test/unit/journal_reply_test.rb
new file mode 100644
index 000000000..500f11a6f
--- /dev/null
+++ b/test/unit/journal_reply_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class JournalReplyTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/no_use_test.rb b/test/unit/no_use_test.rb
new file mode 100644
index 000000000..4e4e903de
--- /dev/null
+++ b/test/unit/no_use_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class NoUseTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/open_source_project_test.rb b/test/unit/open_source_project_test.rb
new file mode 100644
index 000000000..db44aad6e
--- /dev/null
+++ b/test/unit/open_source_project_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class OpenSourceProjectTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
diff --git a/test/unit/relative_memo_test.rb b/test/unit/relative_memo_test.rb
new file mode 100644
index 000000000..5f835a2a8
--- /dev/null
+++ b/test/unit/relative_memo_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class RelativeMemoTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
|