Commit 69a63903 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

some usability improvements

parent eed2314d
......@@ -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
......
......@@ -16,11 +16,11 @@
= 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
......
......@@ -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
......
%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'
......@@ -16,7 +18,11 @@
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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment