Commit 9dc46eee8ed31f3955f5a94731ab72e97797523a
1 parent
7b38a0de
Exists in
master
and in
4 other branches
Return project description back
Showing
4 changed files
with
35 additions
and
2 deletions
Show diff stats
app/controllers/projects_controller.rb
@@ -59,6 +59,7 @@ class ProjectsController < ProjectResourceController | @@ -59,6 +59,7 @@ class ProjectsController < ProjectResourceController | ||
59 | format.html do | 59 | format.html do |
60 | if @project.repository && !@project.repository.empty? | 60 | if @project.repository && !@project.repository.empty? |
61 | @last_push = current_user.recent_push(@project.id) | 61 | @last_push = current_user.recent_push(@project.id) |
62 | + @last_commit = CommitDecorator.decorate(@project.repository.commit) | ||
62 | render :show | 63 | render :show |
63 | else | 64 | else |
64 | render "projects/empty" | 65 | render "projects/empty" |
app/views/projects/_form.html.haml
@@ -9,11 +9,19 @@ | @@ -9,11 +9,19 @@ | ||
9 | Project name is | 9 | Project name is |
10 | .input | 10 | .input |
11 | = f.text_field :name, placeholder: "Example Project", class: "xxlarge" | 11 | = f.text_field :name, placeholder: "Example Project", class: "xxlarge" |
12 | + | ||
13 | + | ||
12 | - unless @repository.heads.empty? | 14 | - unless @repository.heads.empty? |
13 | .clearfix | 15 | .clearfix |
14 | = f.label :default_branch, "Default Branch" | 16 | = f.label :default_branch, "Default Branch" |
15 | .input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;") | 17 | .input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;") |
16 | 18 | ||
19 | + .clearfix | ||
20 | + = f.label :description do | ||
21 | + Project description | ||
22 | + %span.light (optional) | ||
23 | + .input | ||
24 | + = f.text_area :description, placeholder: "awesome project", class: "xxlarge", rows: 3, maxlength: 250 | ||
17 | 25 | ||
18 | %fieldset.features | 26 | %fieldset.features |
19 | %legend Features: | 27 | %legend Features: |
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +.commit | ||
2 | + %p | ||
3 | + %time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") } | ||
4 | + = time_ago_in_words(commit.committed_date) | ||
5 | + ago | ||
6 | + | ||
7 | + = commit.author_link avatar: true, size: 16 | ||
8 | + %p | ||
9 | + = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id" | ||
10 | + | ||
11 | + = link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit.id), class: "row_title" |
app/views/projects/show.html.haml
1 | = render "project_head" | 1 | = render "project_head" |
2 | = render 'clone_panel' | 2 | = render 'clone_panel' |
3 | = render "events/event_last_push", event: @last_push | 3 | = render "events/event_last_push", event: @last_push |
4 | -.content_list= render @events | ||
5 | -.loading.hide | ||
6 | 4 | ||
5 | +.row | ||
6 | + .span8 | ||
7 | + .content_list= render @events | ||
8 | + .loading.hide | ||
9 | + .span4 | ||
10 | + .ui-box.white | ||
11 | + .padded | ||
12 | + %h3.page_title | ||
13 | + = @project.name | ||
14 | + %hr | ||
15 | + - if @project.description.present? | ||
16 | + %p.light= @project.description | ||
17 | + | ||
18 | + %h5 Last commit: | ||
19 | + = render 'last_commit', commit: @last_commit | ||
7 | :javascript | 20 | :javascript |
8 | $(function(){ Pager.init(20); }); | 21 | $(function(){ Pager.init(20); }); |