Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-01-27 09:12:53 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-01-27 09:12:53 +0300
commit0da59cb55bfc8b6bb50f45d0ccdb19edc8b0a6e9 (patch)
tree52a372f621a96f5261f926968141313f29cf6da3 /app/views
parent33913f9b8fef1f8df45dc26239faf8fa4cffc982 (diff)
parente6b97d09470b01b5b65e87dab339c500f1bac45f (diff)
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')
-rw-r--r--app/views/dashboard/_project.html.haml2
-rw-r--r--app/views/dashboard/_projects.html.haml4
-rw-r--r--app/views/dashboard/projects.html.haml2
-rw-r--r--app/views/groups/_projects.html.haml2
-rw-r--r--app/views/projects/_home_panel.html.haml2
-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.haml29
-rw-r--r--app/views/projects/empty.html.haml14
-rw-r--r--app/views/projects/services/index.html.haml25
-rw-r--r--app/views/projects/tree/_tree.html.haml2
-rw-r--r--app/views/users/_groups.html.haml2
13 files changed, 80 insertions, 17 deletions
diff --git a/app/views/dashboard/_project.html.haml b/app/views/dashboard/_project.html.haml
index 89ed5102754..76b95264fd8 100644
--- a/app/views/dashboard/_project.html.haml
+++ b/app/views/dashboard/_project.html.haml
@@ -1,6 +1,8 @@
= link_to project_path(project), class: dom_class(project) do
.dash-project-access-icon
= visibility_level_icon(project.visibility_level)
+ .dash-project-avatar
+ = project_icon(project.to_param, alt: '', class: 'avatar s24')
%span.str-truncated
%span.namespace-name
- if project.namespace
diff --git a/app/views/dashboard/_projects.html.haml b/app/views/dashboard/_projects.html.haml
index 304aa17eba8..0596738342f 100644
--- a/app/views/dashboard/_projects.html.haml
+++ b/app/views/dashboard/_projects.html.haml
@@ -3,8 +3,8 @@
.input-group
= search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'dash-filter form-control'
- if current_user.can_create_project?
- .input-group-addon
- = link_to new_project_path, class: "" do
+ .input-group-addon.dash-new-project
+ = link_to new_project_path do
%strong New project
%ul.well-list.dash-list
diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml
index 944441669e7..f60bcc72e1d 100644
--- a/app/views/dashboard/projects.html.haml
+++ b/app/views/dashboard/projects.html.haml
@@ -11,6 +11,8 @@
- @projects.each do |project|
%li.my-project-row
%h4.project-title
+ .project-avatar
+ = project_icon(project.to_param, alt: '', class: 'avatar s60')
.project-access-icon
= visibility_level_icon(project.visibility_level)
= link_to project_path(project), class: dom_class(project) do
diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml
index 2c65b3049e3..34221595fd7 100644
--- a/app/views/groups/_projects.html.haml
+++ b/app/views/groups/_projects.html.haml
@@ -14,6 +14,8 @@
= link_to project_path(project), class: dom_class(project) do
.dash-project-access-icon
= visibility_level_icon(project.visibility_level)
+ .dash-project-avatar
+ = project_icon(project.to_param, alt: '', class: 'avatar s24')
%span.str-truncated
%span.project-name
= project.name
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 ...
+ &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 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
+ &nbsp;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
diff --git a/app/views/users/_groups.html.haml b/app/views/users/_groups.html.haml
index b9bd6aa3763..32a1dc83b57 100644
--- a/app/views/users/_groups.html.haml
+++ b/app/views/users/_groups.html.haml
@@ -1,4 +1,4 @@
.clearfix
- groups.each do |group|
= link_to group, class: 'profile-groups-avatars', title: group.name do
- = image_tag group_icon(group.path), class: 'avatar s40'
+ = image_tag group_icon(group.path), class: 'avatar avatar-inline s40'