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 | 59 | format.html do |
60 | 60 | if @project.repository && !@project.repository.empty? |
61 | 61 | @last_push = current_user.recent_push(@project.id) |
62 | + @last_commit = CommitDecorator.decorate(@project.repository.commit) | |
62 | 63 | render :show |
63 | 64 | else |
64 | 65 | render "projects/empty" | ... | ... |
app/views/projects/_form.html.haml
... | ... | @@ -9,11 +9,19 @@ |
9 | 9 | Project name is |
10 | 10 | .input |
11 | 11 | = f.text_field :name, placeholder: "Example Project", class: "xxlarge" |
12 | + | |
13 | + | |
12 | 14 | - unless @repository.heads.empty? |
13 | 15 | .clearfix |
14 | 16 | = f.label :default_branch, "Default Branch" |
15 | 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 | 26 | %fieldset.features |
19 | 27 | %legend Features: | ... | ... |
... | ... | @@ -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 | 1 | = render "project_head" |
2 | 2 | = render 'clone_panel' |
3 | 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 | 20 | :javascript |
8 | 21 | $(function(){ Pager.init(20); }); | ... | ... |