Commit b7a89f49fd98801178d204814493d98ec1a64d35
- Date: Sat May 03 15:16:24 +0000 2008
- Committer: mtkd (mtkd@prj2.com)
- Author: mtkd (mtkd@prj2.com)
- Commit SHA1: b7a89f49fd98801178d204814493d98ec1a64d35
- Tree SHA1: b54908b86ffe47005c61e07da3022ce608feb48c
- test/fixtures/projects.yml 10 -------+++
- db/migrate/002_create_projects.rb 11 -------++++
- public/stylesheets/base.css 4 --++
- app/views/members/ac_project_index.html.erb 3 -++
- app/models/project.rb 12 ---------+++
- app/views/layouts/application.html.erb 2 -+
- app/controllers/users_controller.rb 1 +
- app/views/users/ac_show.html.erb 12 ------++++++
Commit diff
- Diff rendering mode:
- inline
- side by side
app/controllers/users_controller.rb
|   | ||
| 13 | 13 | # @projects.map{|p| p.repositories.first }.concat(@repositories).each do |repo| |
| 14 | 14 | # @commits_last_week += repo.count_commits_from_last_week_by_user(@user) |
| 15 | 15 | # end |
| 16 | render :action => 'ac_show' | |
| 16 | 17 | end |
| 17 | 18 | |
| 18 | 19 | def create |
| toggle raw diff | ||
app/models/project.rb
|   | ||
| 18 | 18 | validates_uniqueness_of :slug, :case_sensitive => false |
| 19 | 19 | validates_format_of :slug, :with => /^[a-z0-9_\-]+$/i, |
| 20 | 20 | :message => "must match something in the range of [a-z0-9_\-]+" |
| 21 | ||
| 22 | ||
| 23 | ||
| 24 | ||
| 25 | ||
| 26 | ||
| 27 | ||
| 28 | ||
| 29 | ||
| 21 | # validates_format_of :home_url, :with => URL_FORMAT_RE, | |
| 22 | # :if => proc{|record| !record.home_url.blank? }, | |
| 23 | # :message => "Must begin with http(s)" | |
| 30 | 24 | |
| 31 | 25 | before_validation :downcase_slug |
| 32 | 26 | after_create :create_mainline_repository |
| toggle raw diff | ||
app/views/layouts/application.html.erb
|   | ||
| 47 | 47 | |
| 48 | 48 | <div id='footer'> |
| 49 | 49 | <div class='text'> |
| 50 | ||
| 50 | All content and apps are <a href='/wikis/gnu-agpl-license'>GNU AGPL</a> unless stated otherwise. This site is built using <a href='/projects/<%= APPNAME.downcase %>'><%= APPNAME %></a> for Rails. | |
| 51 | 51 | </div> |
| 52 | 52 | </div> |
| 53 | 53 | |
| toggle raw diff | ||
app/views/members/ac_project_index.html.erb
|   | ||
| 3 | 3 | :project => @project, |
| 4 | 4 | :pagetitle => @title } %> |
| 5 | 5 | |
| 6 | ||
| 6 | <% if @is_member && !@members.empty? %> | |
| 7 | 7 | <div id='projectmembers'> |
| 8 | 8 | <ul> |
| 9 | 9 | <% @members.each do |m| %> |
| … | … | |
| 17 | 17 | |
| 18 | 18 | <%= div_formattedtext_open %> |
| 19 | 19 | |
| 20 | <h4>Recent Messages</h4> | |
| 20 | 21 | <%= render :partial => "ac_list_messages", :locals => { :show_name => !@is_member } %> |
| 21 | 22 | |
| 22 | 23 | <%= div_formattedtext_close %> |
| toggle raw diff | ||
app/views/users/ac_show.html.erb
|   | ||
| 11 | 11 | |
| 12 | 12 | <%= div_content_open(STYLE_WITHRIGHTCOLUMN) %> |
| 13 | 13 | |
| 14 | ||
| 14 | <%= div_formattedtext_open %> | |
| 15 | ||
| 16 | <h1 class='pagetitle'> | |
| 15 | 17 | <%=h @user.login -%> |
| 16 | 18 | <small><%= @user.fullname.blank? ? "" : "(#{h(@user.fullname)})" -%></small> |
| 17 | 19 | </h1> |
| 18 | 20 | |
| 19 | ||
| 21 | <ul> | |
| 20 | 22 | <li><strong>Email:</strong> <%= encoded_mail_to(@user.email) -%></li> |
| 21 | 23 | <li><strong>Url:</strong> <a href="<%=h @user.url -%>"><%=h @user.url -%></a></li> |
| 22 | 24 | <li><strong>Member for</strong> <%= time_ago_in_words(@user.created_at) -%></li> |
| 23 | 25 | </ul> |
| 24 | 26 | |
| 25 | ||
| 26 | 27 | <% unless @projects.blank? -%> |
| 27 | 28 | <h2>Projects</h2> |
| 28 | 29 | <ul class="project_list"> |
| … | … | |
| 34 | 34 | <% end -%> |
| 35 | 35 | </ul> |
| 36 | 36 | <% end -%> |
| 37 | ||
| 38 | 37 | |
| 39 | ||
| 40 | 38 | <% unless @repositories.blank? -%> |
| 41 | 39 | <h2>Repositories</h2> |
| 42 | 40 | <ul> |
| … | … | |
| 46 | 46 | <% end -%> |
| 47 | 47 | </ul> |
| 48 | 48 | <% end -%> |
| 49 | ||
| 50 | 49 | |
| 51 | 50 | <% if current_user && (current_user == @user) -%> |
| 52 | 51 | <% content_for :submenu do -%> |
| … | … | |
| 55 | 55 | <% end -%> |
| 56 | 56 | <% end -%> |
| 57 | 57 | |
| 58 | <%= div_formattedtext_close %> | |
| 59 | ||
| 58 | 60 | <%= div_content_close %> |
| 59 | 61 | |
| 60 | 62 | |
| toggle raw diff | ||
db/migrate/002_create_projects.rb
|   | ||
| 7 | 7 | t.column :user_id, :integer |
| 8 | 8 | t.string :slug, :unique => true |
| 9 | 9 | t.string :license |
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | 10 | t.column :audience, :enum, :limit => [:public, :members_only], :default => :public |
| 14 | ||
| 15 | ||
| 16 | ||
| 17 | ||
| 11 | t.column :status, :enum, :limit => [:active, :inactive, :deleted], :default => :active | |
| 12 | t.column :life_cycle, :enum, :limit => [:planning, :pre_alpha, :alpha, :beta, :stable, :mature_frozen, :other, :notapplicable], :default => :other | |
| 13 | t.column :os, :enum, :limit => [:mac_os, :win32, :linux, :independent, :other, :notapplicable], :default => :notapplicable | |
| 14 | t.column :platform, :enum, :limit => [:ruby, :rails, :dotnet, :python, :php, :other, :notapplicable], :default => :notapplicable | |
| 18 | 15 | t.integer :views, :default => 0 |
| 19 | 16 | t.string :wiki_slug |
| 20 | 17 | t.timestamps |
| toggle raw diff | ||
public/stylesheets/base.css
|   | ||
| 27 | 27 | div.hr hr {display: none;} |
| 28 | 28 | |
| 29 | 29 | /* Page holds all sections - header, breadcrumb, content, footer */ |
| 30 | ||
| 30 | #page { text-align: left; margin: 0 auto; min-width: 960px; } /* holds entire page including header */ | |
| 31 | 31 | |
| 32 | 32 | /* Header holds the top menu and logo */ |
| 33 | 33 | #header { display: block; background: #ededed; border-bottom: 1px solid #aaa; padding: 0px; margin: 0px; width: 100%; height: 29px; } |
| … | … | |
| 132 | 132 | .formattedtext .screenshot { display: block; } |
| 133 | 133 | .formattedtext .screenshot img { border: 1px solid #aaa; display: inline; margin: 0px 10px 0px 0px; } |
| 134 | 134 | |
| 135 | ||
| 135 | .formattedtext .red { color: #ff0000; background-color: #ffe0e0; padding-left: 2px; padding-right: 2px; font-weight: 600; } | |
| 136 | 136 | .formattedtext .small_grey { color: grey; font-size: 0.8em; } |
| 137 | 137 | .formattedtext .small { font-size: 0.8em; } |
| 138 | 138 | |
| toggle raw diff | ||
test/fixtures/projects.yml
|   | ||
| 6 | 6 | user_id: 1 |
| 7 | 7 | slug: "gitlab" |
| 8 | 8 | license: "GNU Affero General Public License (AGPLv3)" |
| 9 | ||
| 10 | ||
| 11 | ||
| 12 | ||
| 9 | life_cycle: :alpha | |
| 10 | os: :independent | |
| 11 | platform: :rails | |
| 13 | 12 | audience: :public |
| 14 | 13 | status: :active |
| 15 | 14 | wiki_slug: "gitlab-contents" |
| … | … | |
| 20 | 20 | user_id: 1 |
| 21 | 21 | slug: "no project" |
| 22 | 22 | license: "" |
| 23 | ||
| 24 | ||
| 25 | ||
| 26 | 23 | # |
| 27 | 24 | audience: :public |
| 28 | 25 | status: :inactive |
| toggle raw diff | ||
