Return project description back
This commit is contained in:
parent
7b38a0de98
commit
9dc46eee8e
4 changed files with 35 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
|
11
app/views/projects/_last_commit.html.haml
Normal file
11
app/views/projects/_last_commit.html.haml
Normal 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
|
||||
|
||||
= commit.author_link avatar: true, size: 16
|
||||
%p
|
||||
= link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
|
||||
|
||||
= link_to_gfm truncate(commit.title, length: 30), project_commit_path(@project, commit.id), class: "row_title"
|
|
@ -1,8 +1,21 @@
|
|||
= render "project_head"
|
||||
= render 'clone_panel'
|
||||
= render "events/event_last_push", event: @last_push
|
||||
|
||||
.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); });
|
||||
|
|
Loading…
Reference in a new issue