Skip to content
Snippets Groups Projects
Commit 033aa1a8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

refactor buttons pt1

parent 9fdbdc66
No related branches found
No related tags found
2 merge requests!2940Expanding repos and hooks paths in settings,!2770Capistrano deploy
Showing
with 34 additions and 34 deletions
Loading
Loading
@@ -11,4 +11,4 @@
 
%pre= @key.key
.right
= link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: "btn danger delete-key"
= link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key"
Loading
Loading
@@ -51,19 +51,19 @@
 
.form-actions
- if @merge_request.new_record?
= f.submit 'Submit merge request', class: "btn success"
= f.submit 'Submit merge request', class: "btn btn-create"
-else
= f.submit 'Save changes', class: "save-btn btn"
= f.submit 'Save changes', class: "btn btn-save"
- if @merge_request.new_record?
= link_to project_merge_requests_path(@project), class: "btn cancel-btn" do
= link_to project_merge_requests_path(@project), class: "btn btn-cancel" do
Cancel
- else
= link_to project_merge_request_path(@project, @merge_request), class: "btn cancel-btn" do
= link_to project_merge_request_path(@project, @merge_request), class: "btn btn-cancel" do
Cancel
 
:javascript
$(function(){
disableButtonIfEmptyField("#merge_request_title", ".save-btn");
disableButtonIfEmptyField("#merge_request_title", ".btn-save");
 
var source_branch = $("#merge_request_source_branch")
, target_branch = $("#merge_request_target_branch");
Loading
Loading
- if can? current_user, :write_merge_request, @project
= link_to new_project_merge_request_path(@project), class: "right btn primary", title: "New Merge Request" do
= link_to new_project_merge_request_path(@project), class: "right btn btn-primary", title: "New Merge Request" do
%i.icon-plus
New Merge Request
%h3.page_title
Loading
Loading
Loading
Loading
@@ -32,16 +32,16 @@
 
.form-actions
- if @milestone.new_record?
= f.submit 'Create milestone', class: "save-btn btn"
= link_to "Cancel", project_milestones_path(@project), class: "btn cancel-btn"
= f.submit 'Create milestone', class: "btn-save btn"
= link_to "Cancel", project_milestones_path(@project), class: "btn btn-cancel"
-else
= f.submit 'Save changes', class: "save-btn btn"
= link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn cancel-btn"
= f.submit 'Save changes', class: "btn-save btn"
= link_to "Cancel", project_milestone_path(@project, @milestone), class: "btn btn-cancel"
 
 
:javascript
$(function() {
disableButtonIfEmptyField("#milestone_title", ".save-btn");
disableButtonIfEmptyField("#milestone_title", ".btn-save");
$( ".datepicker" ).datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText, inst) { $("#milestone_due_date").val(dateText) }
Loading
Loading
Loading
Loading
@@ -25,7 +25,7 @@
%hr
%p
%span All issues for this milestone are closed. You may close milestone now.
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small danger"
= link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {closed: true }), method: :put, class: "btn small btn-remove"
 
.ui-box.ui-box-show
.ui-box-head
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@
%p.cgray
- if current_user.private_token
= text_field_tag "token", current_user.private_token, class: "xxlarge large_text"
= f.submit 'Reset', confirm: "Are you sure?", class: "btn primary btn-build-token"
= f.submit 'Reset', confirm: "Are you sure?", class: "btn btn-primary btn-build-token"
- else
%span You don`t have one yet. Click generate to fix it.
= f.submit 'Generate', class: "btn success btn-build-token"
Loading
Loading
@@ -49,7 +49,7 @@
= f.password_field :password_confirmation, required: true
.clearfix
.input
= f.submit 'Save password', class: "btn save-btn"
= f.submit 'Save password', class: "btn btn-save"
 
 
 
Loading
Loading
@@ -75,6 +75,6 @@
%li It will change web url for personal projects.
%li It will change the git path to repositories for personal projects.
.input
= f.submit 'Save username', class: "btn save-btn"
= f.submit 'Save username', class: "btn btn-save"
 
 
Loading
Loading
@@ -93,4 +93,4 @@
= link_to "Add Public Key", new_key_path, class: "btn small"
 
.form-actions
= f.submit 'Save', class: "btn save-btn"
= f.submit 'Save', class: "btn btn-save"
Loading
Loading
@@ -77,9 +77,9 @@
%br
 
.actions
= f.submit 'Save', class: "btn save-btn"
= f.submit 'Save', class: "btn btn-save"
= link_to 'Cancel', @project, class: "btn"
- unless @project.new_record?
- if can?(current_user, :remove_project, @project)
.right
= link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn danger"
= link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn btn-remove"
Loading
Loading
@@ -7,7 +7,7 @@
Project name is
.input
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
= f.submit 'Create project', class: "btn success project-submit"
= f.submit 'Create project', class: "btn btn-create project-submit"
 
- if current_user.can_select_namespace?
.clearfix
Loading
Loading
Loading
Loading
@@ -31,4 +31,4 @@
 
- if can? current_user, :remove_project, @project
.prepend-top-20
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger right"
= link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove right"
Loading
Loading
@@ -17,6 +17,6 @@
 
 
.actions
= submit_tag 'Assign', class: "btn save-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
= submit_tag 'Assign', class: "btn btn-create"
= link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
 
Loading
Loading
@@ -24,7 +24,7 @@
.span3
= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "chosen span3"})
 
= f.submit 'Protect', class: "primary btn"
= f.submit 'Protect', class: "btn-primary btn"
 
- unless @branches.empty?
%table
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@
%span Looking for
.input
= search_field_tag :search, params[:search], placeholder: "issue 143", class: "input-xxlarge search-text-input", id: "dashboard_search"
= submit_tag 'Search', class: "btn primary wide"
= submit_tag 'Search', class: "btn btn-primary wide"
.clearfix
.row
.span3
Loading
Loading
Loading
Loading
@@ -40,7 +40,7 @@
 
 
.form-actions
= f.submit 'Save', class: 'btn save-btn'
= f.submit 'Save', class: 'btn btn-save'
 
- if @service.valid? && @service.active
= link_to 'Test settings', test_project_service_path(@project), class: 'btn btn-small'
Loading
Loading
@@ -27,7 +27,7 @@
= f.hidden_field :content, class: 'snippet-file-content'
 
.form-actions
= f.submit 'Save', class: "save-btn btn"
= f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", project_snippets_path(@project), class: " btn"
- unless @snippet.new_record?
.right= link_to 'Destroy', [@project, @snippet], confirm: 'Are you sure?', method: :delete, class: "btn right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
Loading
Loading
Loading
Loading
@@ -19,5 +19,5 @@
.input= select_tag :project_access, options_for_select(Project.access_options, @user_project_relation.project_access), class: "project-access-select chosen"
 
.actions
= f.submit 'Save', class: "btn save-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
= f.submit 'Save', class: "btn btn-save"
= link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
Loading
Loading
@@ -23,6 +23,6 @@
- elsif user.blocked
%span.btn.disabled.blocked Blocked
- elsif allow_admin
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "very_small btn danger" do
= link_to project_team_member_path(@project, user), confirm: remove_from_project_team_message(@project, user), method: :delete, class: "very_small btn btn-remove" do
%i.icon-minus.icon-white
 
Loading
Loading
@@ -11,5 +11,5 @@
.right
- if allow_admin
.left
= link_to resign_project_team_path(@project, team), method: :delete, confirm: "Are you shure?", class: "btn danger small" do
= link_to resign_project_team_path(@project, team), method: :delete, confirm: "Are you shure?", class: "btn btn-remove small" do
%i.icon-minus.icon-white
Loading
Loading
@@ -12,6 +12,6 @@
.input= select_tag(:source_project_id, options_from_collection_for_select(current_user.authorized_projects, :id, :name_with_namespace), prompt: "Select project", class: "chosen xxlarge", required: true)
 
.actions
= submit_tag 'Import', class: "btn save-btn"
= link_to "Cancel", project_team_index_path(@project), class: "btn cancel-btn"
= submit_tag 'Import', class: "btn btn-save"
= link_to "Cancel", project_team_index_path(@project), class: "btn btn-cancel"
 
Loading
Loading
@@ -12,7 +12,7 @@
Import team from another project
= link_to available_project_teams_path(@project), class: "btn small grouped", title: "Assign project to team of users" do
Assign project to Team of users
= link_to new_project_team_member_path(@project), class: "btn success small grouped", title: "New Team Member" do
= link_to new_project_team_member_path(@project), class: "btn btn-primary small grouped", title: "New Team Member" do
New Team Member
 
%hr
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment