Commit 69a63903de2f07b8103588abd9577ea089b814f9

Authored by Dmitriy Zaporozhets
1 parent eed2314d

some usability improvements

app/views/milestones/index.html.haml
... ... @@ -3,7 +3,9 @@
3 3 %h3.page_title
4 4 Milestones
5 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 9 %br
8 10  
9 11 .row
... ...
app/views/team_members/_team_member.html.haml
... ... @@ -16,11 +16,11 @@
16 16 = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
17 17 .pull-right
18 18 - if current_user == user
19   - %span.label This is you!
  19 + %span.label.label-success This is you!
20 20 - if @project.namespace_owner == user
21   - %span.label Owner
  21 + %span.label.label-info Owner
22 22 - elsif user.blocked?
23   - %span.label Blocked
  23 + %span.label.label-error Blocked
24 24 - elsif allow_admin
25 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 26 %i.icon-minus.icon-white
... ...
app/views/wikis/_nav.html.haml
... ... @@ -11,8 +11,8 @@
11 11 Git Access
12 12  
13 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 16 %i.icon-plus
17 17 New Page
18 18  
... ...
app/views/wikis/_new.html.haml
1 1 %div#modal-new-wiki.modal.hide
2 2 .modal-header
3 3 %a.close{href: "#"} ×
4   - %h3 New Wiki Page
  4 + %h3.page_title New Wiki Page
5 5 .modal-body
6 6 = label_tag :new_wiki_path do
7 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 11 .modal-footer
10 12 = link_to 'Build', '#', class: 'build-new-wiki btn btn-create'
11 13  
... ... @@ -16,7 +18,11 @@
16 18 modal.show();
17 19 });
18 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 27 $('.modal-header .close').bind("click", function(){
22 28 modal.hide();
... ...