summaryrefslogtreecommitdiff
path: root/app/views/projects/edit.html.haml
diff options
context:
space:
mode:
authorSteven Thonus <steven@ln2.nl>2014-01-25 18:15:44 +0100
committerHannes Rosenögger <123haynes@gmail.com>2015-01-24 18:51:16 +0100
commit42bac7f9f27b0e8fb113e452fc2106882262172d (patch)
treebadf9efefbdf95e02cac54c48d1495cd062476e9 /app/views/projects/edit.html.haml
parentc8c05edcd500c0a755cb6962b51f97381663bd1a (diff)
downloadgitlab-ce-42bac7f9f27b0e8fb113e452fc2106882262172d.tar.gz
adding avatar to project settings page added avatar removal show project avatar on dashboard, projects page, project page added rspec and feature tests added project avatar from repository new default project icon added added copying af avatar to forking of project added generated icon fixed avatar fork hound fix style fix test fix
Diffstat (limited to 'app/views/projects/edit.html.haml')
-rw-r--r--app/views/projects/edit.html.haml28
1 files changed, 27 insertions, 1 deletions
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index f2bb56b5664..fc6499de3e2 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -7,7 +7,8 @@
%p.light Some settings, such as "Transfer Project", are hidden inside the danger area below.
%hr
.panel-body
- = form_for @project, remote: true, html: { class: "edit_project form-horizontal" } do |f|
+ = form_for @project, remote: true, html: { multipart: true, class: "edit_project form-horizontal" }, authenticity_token: true do |f|
+
%fieldset
.form-group.project_name_holder
= f.label :name, class: 'control-label' do
@@ -80,6 +81,31 @@
= f.check_box :snippets_enabled
%span.descr Share code pastes with others out of git repository
+ %fieldset.features
+ %legend
+ Project avatar:
+ .form-group
+ .col-sm-2
+ .col-sm-10
+ = project_icon(@project.to_param, alt: '', class: 'avatar s160', only_uploaded: true)
+ %p.light
+ - if @project.avatar_in_git
+ Project avatar in repository: #{ @project.avatar_in_git }
+ %p.light
+ - if @project.avatar?
+ You can change your project avatar here
+ - else
+ You can upload an project avatar here
+ %a.choose-btn.btn.btn-small.js-choose-project-avatar-button
+ %i.icon-paper-clip
+ %span Choose File ...
+ &nbsp;
+ %span.file_name.js-avatar-filename File name...
+ = f.file_field :avatar, class: "js-project-avatar-input hidden"
+ .light The maximum file size allowed is 100KB.
+ - if @project.avatar?
+ %hr
+ = link_to 'Remove avatar', project_avatar_path(@project), data: { confirm: "Project avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-small remove-avatar"
.form-actions
= f.submit 'Save changes', class: "btn btn-save"