Commit b7a89f49fd98801178d204814493d98ec1a64d35

Random fixes

Commit diff

app/controllers/users_controller.rb

 
1313# @projects.map{|p| p.repositories.first }.concat(@repositories).each do |repo|
1414# @commits_last_week += repo.count_commits_from_last_week_by_user(@user)
1515# end
16 render :action => 'ac_show'
1617 end
1718
1819 def create
toggle raw diff

app/models/project.rb

 
1818 validates_uniqueness_of :slug, :case_sensitive => false
1919 validates_format_of :slug, :with => /^[a-z0-9_\-]+$/i,
2020 :message => "must match something in the range of [a-z0-9_\-]+"
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)"
24 validates_format_of :mailinglist_url, :with => URL_FORMAT_RE,
25 :if => proc{|record| !record.mailinglist_url.blank? },
26 :message => "Must begin with http(s)"
27 validates_format_of :bugtracker_url, :with => URL_FORMAT_RE,
28 :if => proc{|record| !record.bugtracker_url.blank? },
29 :message => "Must begin with http(s)"
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)"
3024
3125 before_validation :downcase_slug
3226 after_create :create_mainline_repository
toggle raw diff

app/views/layouts/application.html.erb

 
4747
4848 <div id='footer'>
4949 <div class='text'>
50 All content and applications 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.
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.
5151 </div>
5252 </div>
5353
toggle raw diff

app/views/members/ac_project_index.html.erb

 
33 :project => @project,
44 :pagetitle => @title } %>
55
6<% if @is_member && @members.size > 1 %>
6<% if @is_member && !@members.empty? %>
77<div id='projectmembers'>
88<ul>
99<% @members.each do |m| %>
1717
1818<%= div_formattedtext_open %>
1919
20<h4>Recent Messages</h4>
2021<%= render :partial => "ac_list_messages", :locals => { :show_name => !@is_member } %>
2122
2223<%= div_formattedtext_close %>
toggle raw diff

app/views/users/ac_show.html.erb

 
1111
1212<%= div_content_open(STYLE_WITHRIGHTCOLUMN) %>
1313
14<h1>
14<%= div_formattedtext_open %>
15
16<h1 class='pagetitle'>
1517 <%=h @user.login -%>
1618 <small><%= @user.fullname.blank? ? "" : "(#{h(@user.fullname)})" -%></small>
1719</h1>
1820
19<ul class="infobox">
21<ul>
2022 <li><strong>Email:</strong> <%= encoded_mail_to(@user.email) -%></li>
2123 <li><strong>Url:</strong> <a href="<%=h @user.url -%>"><%=h @user.url -%></a></li>
2224 <li><strong>Member for</strong> <%= time_ago_in_words(@user.created_at) -%></li>
2325</ul>
2426
25<div id="left">
2627<% unless @projects.blank? -%>
2728 <h2>Projects</h2>
2829 <ul class="project_list">
3434 <% end -%>
3535 </ul>
3636<% end -%>
37</div>
3837
39<div id="right">
4038<% unless @repositories.blank? -%>
4139 <h2>Repositories</h2>
4240 <ul>
4646 <% end -%>
4747 </ul>
4848<% end -%>
49</div>
5049
5150<% if current_user && (current_user == @user) -%>
5251 <% content_for :submenu do -%>
5555 <% end -%>
5656<% end -%>
5757
58<%= div_formattedtext_close %>
59
5860<%= div_content_close %>
5961
6062
toggle raw diff

db/migrate/002_create_projects.rb

 
77 t.column :user_id, :integer
88 t.string :slug, :unique => true
99 t.string :license
10 t.string :home_url
11 t.string :mailinglist_url
12 t.string :bugtracker_url
1310 t.column :audience, :enum, :limit => [:public, :members_only], :default => :public
14 t.column :status, :enum, :limit => [:active, :inactive], :default => :active
15 t.column :life_cycle, :enum, :limit => [:planning, :pre_alpha, :alpha, :beta, :stable, :mature_frozen, :other], :default => :pre_alpha
16 t.column :os, :enum, :limit => [:mac_os, :win32, :linux, :independent, :other, :notapplicable], :default => :independent
17 t.column :platform, :enum, :limit => [:ruby, :rails, :dotnet, :python, :php, :other, :notapplicable], :default => :rails
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
1815 t.integer :views, :default => 0
1916 t.string :wiki_slug
2017 t.timestamps
toggle raw diff

public/stylesheets/base.css

 
2727div.hr hr {display: none;}
2828
2929/* Page holds all sections - header, breadcrumb, content, footer */
30#page { text-align: left; margin: 0 auto; min-width: 800px; } /* holds entire page including header */
30#page { text-align: left; margin: 0 auto; min-width: 960px; } /* holds entire page including header */
3131
3232/* Header holds the top menu and logo */
3333#header { display: block; background: #ededed; border-bottom: 1px solid #aaa; padding: 0px; margin: 0px; width: 100%; height: 29px; }
132132.formattedtext .screenshot { display: block; }
133133.formattedtext .screenshot img { border: 1px solid #aaa; display: inline; margin: 0px 10px 0px 0px; }
134134
135.formattedtext .red { color: #ff0000; font-weight: 600; }
135.formattedtext .red { color: #ff0000; background-color: #ffe0e0; padding-left: 2px; padding-right: 2px; font-weight: 600; }
136136.formattedtext .small_grey { color: grey; font-size: 0.8em; }
137137.formattedtext .small { font-size: 0.8em; }
138138
toggle raw diff

test/fixtures/projects.yml

 
66 user_id: 1
77 slug: "gitlab"
88 license: "GNU Affero General Public License (AGPLv3)"
9 home_url: "http://www.gitlab.org"
10 mailinglist_url:
11 bugtracker_url:
12 #
9 life_cycle: :alpha
10 os: :independent
11 platform: :rails
1312 audience: :public
1413 status: :active
1514 wiki_slug: "gitlab-contents"
2020 user_id: 1
2121 slug: "no project"
2222 license: ""
23 home_url: ""
24 mailinglist_url:
25 bugtracker_url:
2623 #
2724 audience: :public
2825 status: :inactive
toggle raw diff