diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-01-26 22:12:53 -0800 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-01-26 22:12:53 -0800 |
commit | 0da59cb55bfc8b6bb50f45d0ccdb19edc8b0a6e9 (patch) | |
tree | 52a372f621a96f5261f926968141313f29cf6da3 /app/views/projects | |
parent | 33913f9b8fef1f8df45dc26239faf8fa4cffc982 (diff) | |
parent | e6b97d09470b01b5b65e87dab339c500f1bac45f (diff) | |
download | gitlab-ce-0da59cb55bfc8b6bb50f45d0ccdb19edc8b0a6e9.tar.gz |
Merge branch 'master' into move_external_issue_tracker_away_from_yml_config
Conflicts:
app/models/project.rb
spec/models/project_spec.rb
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_home_panel.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/blob/edit.html.haml (renamed from app/views/projects/edit_tree/show.html.haml) | 11 | ||||
-rw-r--r-- | app/views/projects/blob/new.html.haml (renamed from app/views/projects/new_tree/show.html.haml) | 2 | ||||
-rw-r--r-- | app/views/projects/blob/preview.html.haml (renamed from app/views/projects/edit_tree/preview.html.haml) | 0 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 29 | ||||
-rw-r--r-- | app/views/projects/empty.html.haml | 14 | ||||
-rw-r--r-- | app/views/projects/services/index.html.haml | 25 | ||||
-rw-r--r-- | app/views/projects/tree/_tree.html.haml | 2 |
8 files changed, 71 insertions, 14 deletions
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 30d063c7a36..2ed49f83a7a 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -1,5 +1,7 @@ - empty_repo = @project.empty_repo? .project-home-panel{:class => ("empty-project" if empty_repo)} + .project-identicon-holder + = project_icon(@project.to_param, alt: '', class: 'avatar') .project-home-row .project-home-desc - if @project.description.present? diff --git a/app/views/projects/edit_tree/show.html.haml b/app/views/projects/blob/edit.html.haml index 7e0789853af..883845c03f5 100644 --- a/app/views/projects/edit_tree/show.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -1,11 +1,16 @@ .file-editor %ul.nav.nav-tabs.js-edit-mode %li.active - = link_to 'Edit', '#editor' + = link_to '#editor' do + %i.fa.fa-edit + Edit file + %li - = link_to editing_preview_title(@blob.name), '#preview', 'data-preview-url' => preview_project_edit_tree_path(@project, @id) + = link_to '#preview', 'data-preview-url' => project_preview_blob_path(@project, @id) do + %i.fa.fa-eye + = editing_preview_title(@blob.name) - = form_tag(project_edit_tree_path(@project, @id), method: :put, class: "form-horizontal") do + = form_tag(project_update_blob_path(@project, @id), method: :put, class: "form-horizontal") do = render 'projects/blob_editor', ref: @ref, path: @path, blob_data: @blob.data = render 'shared/commit_message_container', params: params, placeholder: "Update #{@blob.name}" diff --git a/app/views/projects/new_tree/show.html.haml b/app/views/projects/blob/new.html.haml index cf7b768694f..57e830d5c56 100644 --- a/app/views/projects/new_tree/show.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,7 +1,7 @@ %h3.page-title New file %hr .file-editor - = form_tag(project_new_tree_path(@project, @id), method: :put, class: 'form-horizontal form-new-file') do + = form_tag(project_create_blob_path(@project, @id), method: :post, class: 'form-horizontal form-new-file') do .form-group.commit_message-group = label_tag 'file_name', class: 'control-label' do File name diff --git a/app/views/projects/edit_tree/preview.html.haml b/app/views/projects/blob/preview.html.haml index e7c3460ad78..e7c3460ad78 100644 --- a/app/views/projects/edit_tree/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index fb4d8270731..31bdbb562a1 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 @@ -71,6 +72,32 @@ = 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 + - if @project.avatar? + = project_icon(@project.to_param, alt: '', class: 'avatar s160') + %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 ... + + %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 200KB. + - 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" diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 59f19c8b7a3..776a7327bc2 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,5 +1,19 @@ +- if current_user && can?(current_user, :download_code, @project) + = render 'shared/no_ssh' + = render "home_panel" +.center.well + %h3 + The repository for this project is empty + %p.lead + You can + = link_to project_new_blob_path(@project, 'master'), class: 'btn btn-new btn-lg' do + add a file + or push it via command line. + +%h4 + %strong Command line instructions %div.git-empty %fieldset %legend Git global setup diff --git a/app/views/projects/services/index.html.haml b/app/views/projects/services/index.html.haml index 7271dd830ca..4604c0afd8d 100644 --- a/app/views/projects/services/index.html.haml +++ b/app/views/projects/services/index.html.haml @@ -1,13 +1,22 @@ %h3.page-title Project services %p.light Project services allow you to integrate GitLab with other applications -%hr -%ul.bordered-list +%table.table + %thead + %tr + %th + %th Service + %th Desription + %th Last edit - @services.sort_by(&:title).each do |service| - %li - %h4 + %tr + %td + = boolean_to_icon service.activated? + %td = link_to edit_project_service_path(@project, service.to_param) do - = service.title - .pull-right - = boolean_to_icon service.activated? - %p= service.description + %strong= service.title + %td + = service.description + %td.light + = time_ago_in_words service.updated_at + ago diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 68ccd4d61bb..f902440b3f1 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -10,7 +10,7 @@ = link_to title, '#' - if current_user && can_push_branch?(@project, @ref) %li - = link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do + = link_to project_new_blob_path(@project, @id), title: 'New file', id: 'new-file-link' do %small %i.fa.fa-plus |