Return project description back

This commit is contained in:
Dmitriy Zaporozhets 2013-03-06 22:56:48 +02:00
parent 7b38a0de98
commit 9dc46eee8e
4 changed files with 35 additions and 2 deletions

View file

@ -59,6 +59,7 @@ class ProjectsController < ProjectResourceController
format.html do
if @project.repository && !@project.repository.empty?
@last_push = current_user.recent_push(@project.id)
@last_commit = CommitDecorator.decorate(@project.repository.commit)
render :show
else
render "projects/empty"

View file

@ -9,11 +9,19 @@
Project name is
.input
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
- unless @repository.heads.empty?
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
.clearfix
= f.label :description do
Project description
%span.light (optional)
.input
= f.text_area :description, placeholder: "awesome project", class: "xxlarge", rows: 3, maxlength: 250
%fieldset.features
%legend Features:

View file

@ -0,0 +1,11 @@
.commit
%p
%time.committed_ago{ datetime: commit.committed_date, title: commit.committed_date.stamp("Aug 21, 2011 9:23pm") }
= time_ago_in_words(commit.committed_date)
ago
&nbsp;
= commit.author_link avatar: true, size: 16
%p
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
&nbsp;
= link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit.id), class: "row_title"

View file

@ -1,8 +1,21 @@
= render "project_head"
= render 'clone_panel'
= render "events/event_last_push", event: @last_push
.content_list= render @events
.loading.hide
.row
.span8
.content_list= render @events
.loading.hide
.span4
.ui-box.white
.padded
%h3.page_title
= @project.name
%hr
- if @project.description.present?
%p.light= @project.description
%h5 Last commit:
= render 'last_commit', commit: @last_commit
:javascript
$(function(){ Pager.init(20); });