OSDN Git Service

some usability improvements
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 16 Apr 2013 19:20:35 +0000 (22:20 +0300)
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Tue, 16 Apr 2013 19:20:35 +0000 (22:20 +0300)
app/views/milestones/index.html.haml
app/views/team_members/_team_member.html.haml
app/views/wikis/_nav.html.haml
app/views/wikis/_new.html.haml

index 8072a36..89892cd 100644 (file)
@@ -3,7 +3,9 @@
   %h3.page_title
     Milestones
     - if can? current_user, :admin_milestone, @project
-      = link_to "New Milestone", new_project_milestone_path(@project), class: "pull-right btn btn-small", title: "New Milestone"
+      = link_to new_project_milestone_path(@project), class: "pull-right btn btn-primary", title: "New Milestone" do
+        %i.icon-plus
+        New Milestone
   %br
 
   .row
index 2b0709b..5fd8d24 100644 (file)
             = f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select span2 trigger-submit"
       .pull-right
         - if current_user == user
-          %span.label This is you!
+          %span.label.label-success This is you!
         - if @project.namespace_owner == user
-          %span.label Owner
+          %span.label.label-info Owner
         - elsif user.blocked?
-          %span.label Blocked
+          %span.label.label-error Blocked
         - elsif allow_admin
           = 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
             %i.icon-minus.icon-white
index 0dffdd8..09a1986 100644 (file)
@@ -11,8 +11,8 @@
       Git Access
 
   - if can?(current_user, :write_wiki, @project)
-    %li.pull-right
-      = link_to '#', class: "add-new-wiki" do
+    .pull-right
+      = link_to '#', class: "add-new-wiki btn btn-small btn-primary" do
         %i.icon-plus
         New Page
 
index 50b40bf..bc1635e 100644 (file)
@@ -1,11 +1,13 @@
 %div#modal-new-wiki.modal.hide
   .modal-header
     %a.close{href: "#"} ×
-    %h3 New Wiki Page
+    %h3.page_title New Wiki Page
   .modal-body
     = label_tag :new_wiki_path do
       %span Page slug
-    = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-xlarge'
+    = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'input-xlarge', required: true
+    %p.hint
+      Please dont use spaces and slashes
   .modal-footer
     = link_to 'Build', '#', class: 'build-new-wiki btn btn-create'
 
       modal.show();
     });
     $('.build-new-wiki').bind("click", function(){
-      location.href = "#{project_wikis_path(@project)}/" + $('#new_wiki_path').val();
+      var slug = $('#new_wiki_path').val();
+
+      if(slug.length > 0) {
+        location.href = "#{project_wikis_path(@project)}/" + slug;
+      }
     });
     $('.modal-header .close').bind("click", function(){
       modal.hide();