Commit efe4d5593d61ed7ef531ade4fb0793b998289c12
- Date: Sun May 25 09:05:12 +0000 2008
- Committer: mtkd (mtkd@prj2.com)
- Author: mtkd (mtkd@prj2.com)
- Commit SHA1: efe4d5593d61ed7ef531ade4fb0793b998289c12
- Tree SHA1: 4fa5412fb9b7d81742540c3cbe2ca74b5ba25b42
- app/views/projects/ac_team.html.erb 15 -------------++
- app/views/messages/_ac_right_actionbox_post_message.html.erb 2 -+
- app/controllers/projects_controller.rb 7 ------+
- public/stylesheets/base.css 2 --
- app/views/searches/ac_search.html.erb 3 +++
- app/models/project.rb 22 -----------+++++++++++
- app/models/message.rb 17 -------++++++++++
- app/views/trees/ac_show.html.erb 3 +++
- app/views/repositories/ac_index.html.erb 1 +
- app/views/site/dashboard.html.erb 3 +++
- app/views/messages/_ac_list_messages.html.erb 4 ---+
- app/controllers/messages_controller.rb 5 --+++
Commit diff
- Diff rendering mode:
- inline
- side by side
app/controllers/messages_controller.rb
|   | ||
| 1 | 1 | class MessagesController < ApplicationController |
| 2 | 2 | |
| 3 | ||
| 3 | before_filter :find_project | |
| 4 | 4 | |
| 5 | 5 | def create |
| 6 | 6 | @message = Message.new(params[:message]) |
| … | … | |
| 8 | 8 | @message.project_id = @project.id |
| 9 | 9 | if @message.save |
| 10 | 10 | Journal.create(@message, request.env["REMOTE_ADDR"], @project.id, current_user.id).to_s |
| 11 | ||
| 11 | redirect_to "/projects/" + @project.slug + "/team/" | |
| 12 | ||
| 12 | 13 | else |
| 13 | 14 | #FIXME this is wrong I think |
| 14 | 15 | flash[:error] = 'Error.' |
| toggle raw diff | ||
app/controllers/projects_controller.rb
|   | ||
| 91 | 91 | |
| 92 | 92 | def team |
| 93 | 93 | @title, @url_suffix = Project.tab_settings(PRJ_TAB_TEAM) |
| 94 | ||
| 95 | ||
| 96 | ||
| 97 | ||
| 98 | ||
| 99 | ||
| 94 | @messages = Message.find_by_project(@project.id, 40) | |
| 100 | 95 | render :action => "ac_team" |
| 101 | 96 | end |
| 102 | 97 | |
| toggle raw diff | ||
app/models/message.rb
|   | ||
| 5 | 5 | |
| 6 | 6 | protected |
| 7 | 7 | |
| 8 | ||
| 9 | ||
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | ||
| 14 | ||
| 8 | ||
| 9 | #def self.find_by_project_user(project_id, user_id, limit) | |
| 10 | # find(:all, | |
| 11 | # :conditions => ["project_id = '#{project_id}' AND user_id = '#{user_id}'"], | |
| 12 | # :order => "created_at DESC", | |
| 13 | # :limit => limit | |
| 14 | # ) | |
| 15 | #end | |
| 15 | 16 | |
| 17 | #TODO check this include is working | |
| 16 | 18 | def self.find_by_project(project_id, limit) |
| 17 | 19 | find(:all, |
| 20 | :include => "user", | |
| 18 | 21 | :conditions => ["project_id = '#{project_id}'"], |
| 19 | 22 | :order => "created_at DESC", |
| 20 | 23 | :limit => limit |
| toggle raw diff | ||
app/models/project.rb
|   | ||
| 80 | 80 | (candidate == user) && (repositories.size == 1) |
| 81 | 81 | end |
| 82 | 82 | |
| 83 | ||
| 84 | ||
| 85 | ||
| 86 | ||
| 87 | ||
| 83 | # def tag_list=(tag_list) | |
| 84 | # tag_list.gsub!(",", "") | |
| 85 | # | |
| 86 | # super | |
| 87 | # end | |
| 88 | 88 | |
| 89 | 89 | def home_url=(url) |
| 90 | 90 | self[:home_url] = clean_url(url) |
| 91 | 91 | end |
| 92 | 92 | |
| 93 | ||
| 94 | ||
| 95 | ||
| 93 | # def mailinglist_url=(url) | |
| 94 | # self[:mailinglist_url] = clean_url(url) | |
| 95 | # end | |
| 96 | 96 | |
| 97 | ||
| 98 | ||
| 99 | ||
| 97 | # def bugtracker_url=(url) | |
| 98 | # self[:bugtracker_url] = clean_url(url) | |
| 99 | # end | |
| 100 | 100 | |
| 101 | 101 | def stripped_description |
| 102 | 102 | description.gsub(/<\/?[^>]*>/, "") |
| toggle raw diff | ||
app/views/messages/_ac_list_messages.html.erb
|   | ||
| 1 | 1 | <ul> |
| 2 | 2 | <% @messages.each do |m| %> |
| 3 | 3 | <li> |
| 4 | ||
| 5 | 4 | <strong><%= m.user.fullname %></strong> |
| 6 | ||
| 7 | 5 | <%= m.activity %> |
| 8 | 6 | <span class='small_grey'>(<%= time_ago_in_words(m.created_at) %> ago)</span> |
| 9 | 7 | </li> |
| 10 | 8 | <% end %> |
| 11 | ||
| 9 | </ul> | |
| toggle raw diff | ||
app/views/messages/_ac_right_actionbox_post_message.html.erb
|   | ||
| 1 | 1 | |
| 2 | 2 | <table class='right_input'> |
| 3 | 3 | <tr><td> |
| 4 | ||
| 4 | <% form_for :message, :url => project_messages_path(@project.slug), :method => :post, :html => {:name => 'postmessage', :id => 'input'} do |f| -%> | |
| 5 | 5 | |
| 6 | 6 | <label>Message:</label> |
| 7 | 7 | <%= f.text_area(:activity, :rows => 2) -%> |
| toggle raw diff | ||
app/views/projects/ac_team.html.erb
|   | ||
| 3 | 3 | :project => @project, |
| 4 | 4 | :pagetitle => @title } %> |
| 5 | 5 | |
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | ||
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | ||
| 14 | ||
| 15 | ||
| 16 | ||
| 17 | ||
| 6 | ||
| 18 | 7 | <%= div_formattedtext_open %> |
| 19 | 8 | |
| 20 | 9 | <h4>Recent Messages</h4> |
| 21 | ||
| 10 | <%= render :partial => "messages/ac_list_messages", :locals => { :show_name => true } %> | |
| 22 | 11 | |
| 23 | 12 | <%= div_formattedtext_close %> |
| 24 | 13 | |
| toggle raw diff | ||
app/views/repositories/ac_index.html.erb
|   | ||
| 1 | <% meta_noindex %> | |
| 1 | 2 | <% meta_nofollow %> |
| 2 | 3 | |
| 3 | 4 | <%= render :partial => "projects/ac_project_header", :locals => { :tab => PRJ_TAB_GIT, :subtab => PRJ_TAB_SUBTAB_NONE, :project => @project, :pagetitle => @title } %> |
| toggle raw diff | ||
app/views/searches/ac_search.html.erb
|   | ||
| 1 | <% meta_noindex %> | |
| 2 | <% meta_nofollow %> | |
| 3 | ||
| 1 | 4 | <% title "Search" %> |
| 2 | 5 | |
| 3 | 6 | <%= div_breadcrumb_open %> |
| toggle raw diff | ||
app/views/site/dashboard.html.erb
|   | ||
| 1 | <% meta_noindex %> | |
| 2 | <% meta_nofollow %> | |
| 3 | ||
| 1 | 4 | <% @page_title = "#{current_user.login}'s dashboard" -%> |
| 2 | 5 | |
| 3 | 6 | <div id="recent_comments"> |
| toggle raw diff | ||
app/views/trees/ac_show.html.erb
|   | ||
| 1 | <% meta_noindex %> | |
| 2 | <% meta_nofollow %> | |
| 3 | ||
| 1 | 4 | <%= render :partial => "projects/ac_project_header", :locals => { :tab => PRJ_TAB_GIT, :subtab => PRJ_TAB_GIT_TREE, :project => @project, :pagetitle => @title } %> |
| 2 | 5 | |
| 3 | 6 | <%= breadcrumb_path(@repository.name, @commit.id) -%> |
| toggle raw diff | ||
public/stylesheets/base.css
|   | ||
| 259 | 259 | table.progress td.closed { background: #bae0ba } |
| 260 | 260 | table.progress td :hover { background: none } |
| 261 | 261 | |
| 262 | ||
| 263 | ||
| 264 | 262 | |
| 265 | 263 | |
| 266 | 264 | |
| toggle raw diff | ||
