diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-27 09:31:15 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-27 09:31:15 +0300 |
commit | f5551efdfd71c6aedb609093374a6c4dbed6a78b (patch) | |
tree | 226bcf5561a02cea3c1b95339f7063a389cb7bf4 /app/views | |
parent | 70bf7f6e191c0e99ad03e1eec2ecbe2aae53fa09 (diff) | |
download | gitlab-ce-f5551efdfd71c6aedb609093374a6c4dbed6a78b.tar.gz |
Rewrite and improve git backend logic. Fix project movind. Raise exception to prevent unexpected issues
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/dashboard/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/groups/new.html.haml | 22 | ||||
-rw-r--r-- | app/views/admin/groups/show.html.haml | 18 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 110 | ||||
-rw-r--r-- | app/views/admin/users/edit.html.haml | 5 | ||||
-rw-r--r-- | app/views/admin/users/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/dashboard/issues.atom.builder | 8 | ||||
-rw-r--r-- | app/views/events/_event.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/notify.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/_no_ssh.html.haml | 2 |
11 files changed, 102 insertions, 79 deletions
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index ad8d9f007a1..b68d7f0d003 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -28,6 +28,8 @@ %h1= Project.count %hr = link_to 'New Project', new_project_path, class: "btn small" + + = link_to 'New Group', new_admin_group_path, class: "btn small" .span4 .ui-box %h5 Users @@ -44,7 +46,7 @@ %hr - @projects.each do |project| %p - = link_to project.name, [:admin, project] + = link_to project.name_with_namespace, [:admin, project] .span6 %h3 Latest users %hr diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml index d6b6ea1535e..6ff0e781d17 100644 --- a/app/views/admin/groups/new.html.haml +++ b/app/views/admin/groups/new.html.haml @@ -1,3 +1,21 @@ %h3.page_title New Group -%br -= render 'form' +%hr += form_for [:admin, @group] do |f| + - if @group.errors.any? + .alert-message.block-message.error + %span= @group.errors.full_messages.first + .clearfix + = f.label :name do + Group name is + .input + = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" + + = f.submit 'Create group', class: "btn primary" + %hr + .padded + %ul + %li Group is kind of directory for several projects + %li All created groups are private + %li People within a group see only projects they have access to + %li All projects of group will be stored in group directory + %li You will be able to move existing projects into group diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 0254d98a0f9..f447ac10aea 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -22,7 +22,7 @@ %b Path: %td - = @group.path + %span.monospace= File.join(Gitlab.config.git_base_path, @group.path) %tr %td %b @@ -43,10 +43,14 @@ = link_to 'Remove from group', remove_project_admin_group_path(@group, project_id: project.id), confirm: 'Are you sure?', method: :delete, class: "btn danger small" .clearfix -%br -%h3 Add new project -%br + = form_tag project_update_admin_group_path(@group), class: "bulk_import", method: :put do - = select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' - .form-actions - = submit_tag 'Add', class: "btn primary" + %fieldset + %legend Move projects to group + .clearfix + = label_tag :project_ids do + Projects + .input + = select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name_with_namespace), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5' + .form-actions + = submit_tag 'Add', class: "btn primary" diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 312398565c9..45195152cb7 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -6,52 +6,42 @@ - @admin_user.errors.full_messages.each do |msg| %li= msg - .row - .span7 - .ui-box - %br - .clearfix - = f.label :name - .input - = f.text_field :name - %span.help-inline * required - .clearfix - = f.label :username - .input - = f.text_field :username - %span.help-inline * required - .clearfix - = f.label :email - .input - = f.text_field :email - %span.help-inline * required - %hr - -if f.object.new_record? - .clearfix - = f.label :force_random_password do - %span Generate random password - .input= f.check_box :force_random_password, {}, true, nil + %fieldset + %legend Account + .clearfix + = f.label :name + .input + = f.text_field :name, required: true + %span.help-inline * required + .clearfix + = f.label :username + .input + = f.text_field :username, required: true + %span.help-inline * required + .clearfix + = f.label :email + .input + = f.text_field :email, required: true + %span.help-inline * required - %div.password-fields - .clearfix - = f.label :password - .input= f.password_field :password, disabled: f.object.force_random_password - .clearfix - = f.label :password_confirmation - .input= f.password_field :password_confirmation, disabled: f.object.force_random_password - %hr - .clearfix - = f.label :skype - .input= f.text_field :skype - .clearfix - = f.label :linkedin - .input= f.text_field :linkedin - .clearfix - = f.label :twitter - .input= f.text_field :twitter - .span5 - .ui-box - %br + %fieldset + %legend Password + .clearfix + = f.label :password + .input= f.password_field :password, disabled: f.object.force_random_password + .clearfix + = f.label :password_confirmation + .input= f.password_field :password_confirmation, disabled: f.object.force_random_password + -if f.object.new_record? + .clearfix + = f.label :force_random_password do + %span Generate random password + .input= f.check_box :force_random_password, {}, true, nil + + %fieldset + %legend Access + .row + .span8 .clearfix = f.label :projects_limit .input= f.number_field :projects_limit @@ -60,23 +50,27 @@ = f.label :admin do %strong.cred Administrator .input= f.check_box :admin + .span4 - unless @admin_user.new_record? - %hr - .padded.cred + .alert.alert-error - if @admin_user.blocked - %span - This user is blocked and is not able to login to GitLab - .clearfix - = link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn small right" + %p This user is blocked and is not able to login to GitLab + = link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn small" - else - %span - Blocked users will be removed from all projects & will not be able to login to GitLab. - .clearfix - = link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small right danger" + %p Blocked users will be removed from all projects & will not be able to login to GitLab. + = link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger" + %fieldset + %legend Profile + .clearfix + = f.label :skype + .input= f.text_field :skype + .clearfix + = f.label :linkedin + .input= f.text_field :linkedin + .clearfix + = f.label :twitter + .input= f.text_field :twitter - .row - .span6 - .span6 .actions = f.submit 'Save', class: "btn save-btn" - if @admin_user.new_record? diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index 032e3cfaa99..f8ff77b8f53 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,3 +1,6 @@ -%h3.page_title #{@admin_user.name} → Edit user +%h3.page_title + #{@admin_user.name} → + %i.icon-edit + Edit user %hr = render 'form' diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index 70ead0d3f7d..1e82b249cf1 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,3 +1,5 @@ -%h3.page_title New user -%br +%h3.page_title + %i.icon-plus + New user +%hr = render 'form' diff --git a/app/views/dashboard/issues.atom.builder b/app/views/dashboard/issues.atom.builder index 5bd07bcd89f..28bdc5ed814 100644 --- a/app/views/dashboard/issues.atom.builder +++ b/app/views/dashboard/issues.atom.builder @@ -1,9 +1,9 @@ xml.instruct! xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do - xml.title "#{@user.name} issues" - xml.link :href => dashboard_issues_url(:atom, :private_token => @user.private_token), :rel => "self", :type => "application/atom+xml" - xml.link :href => dashboard_issues_url(:private_token => @user.private_token), :rel => "alternate", :type => "text/html" - xml.id dashboard_issues_url(:private_token => @user.private_token) + xml.title "#{current_user.name} issues" + xml.link :href => dashboard_issues_url(:atom, :private_token => current_user.private_token), :rel => "self", :type => "application/atom+xml" + xml.link :href => dashboard_issues_url(:private_token => current_user.private_token), :rel => "alternate", :type => "text/html" + xml.id dashboard_issues_url(:private_token => current_user.private_token) xml.updated @issues.first.created_at.strftime("%Y-%m-%dT%H:%M:%SZ") if @issues.any? @issues.each do |issue| diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index 0d91a67a60d..2446b764e4d 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -1,7 +1,7 @@ - if event.allowed? %div.event-item = event_image(event) - = image_tag gravatar_icon(event.author_email), class: "avatar" + = image_tag gravatar_icon(event.author_email), class: "avatar s24" - if event.push? = render "events/event/push", event: event diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index 8cfe1982316..35bf5577e1c 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -20,7 +20,7 @@ %td{style: "font-size: 0px;", width: "20"} \ %td{align: "left", style: "padding: 18px 0 10px;", width: "580"} - %h1{style: "color: #BBBBBB; font: normal 32px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 40px;"} + %h1{style: "color: #BBBBBB; font: normal 22px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"} GITLAB - if @project | #{@project.name} diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index 0d5f545850a..8448193deb9 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -23,7 +23,7 @@ %tr %td = link_to project do - %strong.term= project.name + %strong.term= project.name_with_namespace %small.cgray last activity at = project.last_activity_date.stamp("Aug 25, 2011") diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index c75a1d93b70..4e643090904 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -1,3 +1,3 @@ - if current_user.require_ssh_key? %p.error_message - You won't be able to pull or push project code until you #{link_to 'add an SSH key', new_key_path} to your profile + You won't be able to pull or push project code via SSH until you #{link_to 'add an SSH key', new_key_path} to your profile |