Commit 69a63903de2f07b8103588abd9577ea089b814f9
1 parent
eed2314d
Exists in
master
and in
4 other branches
some usability improvements
Showing
4 changed files
with
17 additions
and
9 deletions
Show diff stats
app/views/milestones/index.html.haml
@@ -3,7 +3,9 @@ | @@ -3,7 +3,9 @@ | ||
3 | %h3.page_title | 3 | %h3.page_title |
4 | Milestones | 4 | Milestones |
5 | - if can? current_user, :admin_milestone, @project | 5 | - if can? current_user, :admin_milestone, @project |
6 | - = link_to "New Milestone", new_project_milestone_path(@project), class: "pull-right btn btn-small", title: "New Milestone" | 6 | + = link_to new_project_milestone_path(@project), class: "pull-right btn btn-primary", title: "New Milestone" do |
7 | + %i.icon-plus | ||
8 | + New Milestone | ||
7 | %br | 9 | %br |
8 | 10 | ||
9 | .row | 11 | .row |
app/views/team_members/_team_member.html.haml
@@ -16,11 +16,11 @@ | @@ -16,11 +16,11 @@ | ||
16 | = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit" | 16 | = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit" |
17 | .pull-right | 17 | .pull-right |
18 | - if current_user == user | 18 | - if current_user == user |
19 | - %span.label This is you! | 19 | + %span.label.label-success This is you! |
20 | - if @project.namespace_owner == user | 20 | - if @project.namespace_owner == user |
21 | - %span.label Owner | 21 | + %span.label.label-info Owner |
22 | - elsif user.blocked? | 22 | - elsif user.blocked? |
23 | - %span.label Blocked | 23 | + %span.label.label-error Blocked |
24 | - elsif allow_admin | 24 | - elsif allow_admin |
25 | = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do | 25 | = link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from team' do |
26 | %i.icon-minus.icon-white | 26 | %i.icon-minus.icon-white |
app/views/wikis/_nav.html.haml
@@ -11,8 +11,8 @@ | @@ -11,8 +11,8 @@ | ||
11 | Git Access | 11 | Git Access |
12 | 12 | ||
13 | - if can?(current_user, :write_wiki, @project) | 13 | - if can?(current_user, :write_wiki, @project) |
14 | - %li.pull-right | ||
15 | - = link_to '#', class: "add-new-wiki" do | 14 | + .pull-right |
15 | + = link_to '#', class: "add-new-wiki btn btn-small btn-primary" do | ||
16 | %i.icon-plus | 16 | %i.icon-plus |
17 | New Page | 17 | New Page |
18 | 18 |
app/views/wikis/_new.html.haml
1 | %div#modal-new-wiki.modal.hide | 1 | %div#modal-new-wiki.modal.hide |
2 | .modal-header | 2 | .modal-header |
3 | %a.close{href: "#"} × | 3 | %a.close{href: "#"} × |
4 | - %h3 New Wiki Page | 4 | + %h3.page_title New Wiki Page |
5 | .modal-body | 5 | .modal-body |
6 | = label_tag :new_wiki_path do | 6 | = label_tag :new_wiki_path do |
7 | %span Page slug | 7 | %span Page slug |
8 | - = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-xlarge' | 8 | + = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-xlarge', required: true |
9 | + %p.hint | ||
10 | + Please dont use spaces and slashes | ||
9 | .modal-footer | 11 | .modal-footer |
10 | = link_to 'Build', '#', class: 'build-new-wiki btn btn-create' | 12 | = link_to 'Build', '#', class: 'build-new-wiki btn btn-create' |
11 | 13 | ||
@@ -16,7 +18,11 @@ | @@ -16,7 +18,11 @@ | ||
16 | modal.show(); | 18 | modal.show(); |
17 | }); | 19 | }); |
18 | $('.build-new-wiki').bind("click", function(){ | 20 | $('.build-new-wiki').bind("click", function(){ |
19 | - location.href = "#{project_wikis_path(@project)}/" + $('#new_wiki_path').val(); | 21 | + var slug = $('#new_wiki_path').val(); |
22 | + | ||
23 | + if(slug.length > 0) { | ||
24 | + location.href = "#{project_wikis_path(@project)}/" + slug; | ||
25 | + } | ||
20 | }); | 26 | }); |
21 | $('.modal-header .close').bind("click", function(){ | 27 | $('.modal-header .close').bind("click", function(){ |
22 | modal.hide(); | 28 | modal.hide(); |