...@@ -12,6 +12,7 @@ before_install: ...@@ -12,6 +12,7 @@ before_install:
branches: branches:
only: only:
- 'master' - 'master'
- 'rails4'
rvm: rvm:
- 2.0.0 - 2.0.0
services: services:
... ...
......
...@@ -8,15 +8,21 @@ def linux_only(require_as) ...@@ -8,15 +8,21 @@ def linux_only(require_as)
RUBY_PLATFORM.include?('linux') && require_as RUBY_PLATFORM.include?('linux') && require_as
end end
gem "rails", "3.2.16" gem "rails", "~> 4.0.0"
gem "protected_attributes"
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
gem 'activerecord-deprecated_finders'
# Supported DBs # Supported DBs
gem "mysql2", group: :mysql gem "mysql2", group: :mysql
gem "pg", group: :postgres gem "pg", group: :postgres
# Auth # Auth
gem "devise", '~> 2.2' gem "devise", '3.0.4'
gem "devise-async" gem "devise-async", '0.8.0'
gem 'omniauth', "~> 1.1.3" gem 'omniauth', "~> 1.1.3"
gem 'omniauth-google-oauth2' gem 'omniauth-google-oauth2'
gem 'omniauth-twitter' gem 'omniauth-twitter'
...@@ -24,10 +30,10 @@ gem 'omniauth-github' ...@@ -24,10 +30,10 @@ gem 'omniauth-github'
# Extracting information from a git repository # Extracting information from a git repository
# Provide access to Gitlab::Git library # Provide access to Gitlab::Git library
gem "gitlab_git", "~> 3.1.0" gem "gitlab_git", "~> 4.0.0.pre"
# Ruby/Rack Git Smart-HTTP Server Handler # Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 1.1.0', require: 'grack' gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
# LDAP Auth # LDAP Auth
gem 'gitlab_omniauth-ldap', '1.0.3', require: "omniauth-ldap" gem 'gitlab_omniauth-ldap', '1.0.3', require: "omniauth-ldap"
...@@ -42,7 +48,7 @@ gem "gitlab-gollum-lib", "~> 1.0.2", require: 'gollum-lib' ...@@ -42,7 +48,7 @@ gem "gitlab-gollum-lib", "~> 1.0.2", require: 'gollum-lib'
gem "gitlab-linguist", "~> 2.9.6", require: "linguist" gem "gitlab-linguist", "~> 2.9.6", require: "linguist"
# API # API
gem "grape", "~> 0.4.1" gem "grape", "~> 0.6.1"
gem "grape-entity", "~> 0.3.0" gem "grape-entity", "~> 0.3.0"
gem 'rack-cors', require: 'rack/cors' gem 'rack-cors', require: 'rack/cors'
...@@ -128,7 +134,6 @@ gem "sanitize" ...@@ -128,7 +134,6 @@ gem "sanitize"
# Protect against bruteforcing # Protect against bruteforcing
gem "rack-attack" gem "rack-attack"
group :assets do
gem "sass-rails" gem "sass-rails"
gem "coffee-rails" gem "coffee-rails"
gem "uglifier" gem "uglifier"
...@@ -138,16 +143,15 @@ group :assets do ...@@ -138,16 +143,15 @@ group :assets do
gem 'chosen-rails', "1.0.1" gem 'chosen-rails', "1.0.1"
gem 'select2-rails' gem 'select2-rails'
gem 'jquery-atwho-rails', "0.3.0" gem 'jquery-atwho-rails', "~> 0.4.1"
gem "jquery-rails", "2.1.3" gem "jquery-rails", "2.1.3"
gem "jquery-ui-rails", "2.0.2" gem "jquery-ui-rails", "2.0.2"
gem "modernizr", "2.6.2" gem "modernizr", "2.6.2"
gem "raphael-rails", "~> 2.1.2" gem "raphael-rails", "~> 2.1.2"
gem 'bootstrap-sass' gem 'bootstrap-sass', '~> 2.3'
gem "font-awesome-rails" gem "font-awesome-rails", '~> 3.2'
gem "gemoji", "~> 1.2.1", require: 'emoji/railtie' gem "gemoji", "~> 1.3.0"
gem "gon" gem "gon", git: "https://github.com/gitlabhq/gon.git", ref: '58ca8e17273051cb370182cabd3602d1da6783ab'
end
group :development do group :development do
gem "annotate", "~> 2.6.0.beta2" gem "annotate", "~> 2.6.0.beta2"
...@@ -170,7 +174,7 @@ end ...@@ -170,7 +174,7 @@ end
group :development, :test do group :development, :test do
gem 'coveralls', require: false gem 'coveralls', require: false
gem 'rails-dev-tweaks' # gem 'rails-dev-tweaks'
gem 'spinach-rails' gem 'spinach-rails'
gem "rspec-rails" gem "rspec-rails"
gem "capybara" gem "capybara"
...@@ -199,7 +203,7 @@ group :development, :test do ...@@ -199,7 +203,7 @@ group :development, :test do
gem 'poltergeist', '~> 1.4.1' gem 'poltergeist', '~> 1.4.1'
gem 'spork', '~> 1.0rc' gem 'spork', '~> 1.0rc'
gem 'jasmine' gem 'jasmine', '2.0.0.rc5'
end end
group :test do group :test do
... ...
......
This diff is collapsed.
require_relative "base_context"
module Files module Files
class CreateContext < BaseContext class CreateContext < BaseContext
def execute def execute
... ...
......
require_relative "base_context"
module Files module Files
class DeleteContext < BaseContext class DeleteContext < BaseContext
def execute def execute
... ...
......
require_relative "base_context"
module Files module Files
class UpdateContext < BaseContext class UpdateContext < BaseContext
def execute def execute
... ...
......
...@@ -22,7 +22,7 @@ module Issues ...@@ -22,7 +22,7 @@ module Issues
opts[:milestone_id] = milestone_id if milestone_id.present? opts[:milestone_id] = milestone_id if milestone_id.present?
opts[:assignee_id] = assignee_id if assignee_id.present? opts[:assignee_id] = assignee_id if assignee_id.present?
issues = Issue.where(id: issues_ids).all issues = Issue.where(id: issues_ids)
issues = issues.select { |issue| can?(current_user, :modify_issue, issue) } issues = issues.select { |issue| can?(current_user, :modify_issue, issue) }
issues.each do |issue| issues.each do |issue|
... ...
......
require 'gon'
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
before_filter :authenticate_user! before_filter :authenticate_user!
before_filter :reject_blocked! before_filter :reject_blocked!
...@@ -7,6 +9,7 @@ class ApplicationController < ActionController::Base ...@@ -7,6 +9,7 @@ class ApplicationController < ActionController::Base
before_filter :dev_tools if Rails.env == 'development' before_filter :dev_tools if Rails.env == 'development'
before_filter :default_headers before_filter :default_headers
before_filter :add_gon_variables before_filter :add_gon_variables
before_filter :configure_permitted_parameters, if: :devise_controller?
protect_from_forgery protect_from_forgery
...@@ -199,4 +202,9 @@ class ApplicationController < ActionController::Base ...@@ -199,4 +202,9 @@ class ApplicationController < ActionController::Base
formats: [:html] formats: [:html]
) )
end end
def configure_permitted_parameters
devise_parameter_sanitizer.for(:sign_in) { |u| u.permit(:username, :email, :password) }
devise_parameter_sanitizer.for(:sign_up) { |u| u.permit(:username, :email, :name, :password, :password_confirmation) }
end
end end
...@@ -82,7 +82,7 @@ module ProjectsHelper ...@@ -82,7 +82,7 @@ module ProjectsHelper
end end
def project_active_milestones def project_active_milestones
@project.milestones.active.order("due_date, title ASC").all @project.milestones.active.order("due_date, title ASC")
end end
def project_issues_trackers(current_tracker = nil) def project_issues_trackers(current_tracker = nil)
... ...
......
...@@ -18,7 +18,7 @@ class Event < ActiveRecord::Base ...@@ -18,7 +18,7 @@ class Event < ActiveRecord::Base
attr_accessible :project, :action, :data, :author_id, :project_id, attr_accessible :project, :action, :data, :author_id, :project_id,
:target_id, :target_type :target_id, :target_type
default_scope where("author_id IS NOT NULL") default_scope { where.not(author_id: nil) }
CREATED = 1 CREATED = 1
UPDATED = 2 UPDATED = 2
... ...
......
...@@ -26,7 +26,7 @@ class Group < Namespace ...@@ -26,7 +26,7 @@ class Group < Namespace
def add_users(user_ids, group_access) def add_users(user_ids, group_access)
user_ids.compact.each do |user_id| user_ids.compact.each do |user_id|
user = self.users_groups.find_or_initialize_by_user_id(user_id) user = self.users_groups.find_or_initialize_by(user_id: user_id)
user.update_attributes(group_access: group_access) user.update_attributes(group_access: group_access)
end end
end end
... ...
......
...@@ -42,10 +42,10 @@ class Project < ActiveRecord::Base ...@@ -42,10 +42,10 @@ class Project < ActiveRecord::Base
# Relations # Relations
belongs_to :creator, foreign_key: "creator_id", class_name: "User" belongs_to :creator, foreign_key: "creator_id", class_name: "User"
belongs_to :group, foreign_key: "namespace_id", conditions: "type = 'Group'" belongs_to :group, -> { where(type: Group) }, foreign_key: "namespace_id"
belongs_to :namespace belongs_to :namespace
has_one :last_event, class_name: 'Event', order: 'events.created_at DESC', foreign_key: 'project_id' has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event', foreign_key: 'project_id'
has_one :gitlab_ci_service, dependent: :destroy has_one :gitlab_ci_service, dependent: :destroy
has_one :campfire_service, dependent: :destroy has_one :campfire_service, dependent: :destroy
has_one :pivotaltracker_service, dependent: :destroy has_one :pivotaltracker_service, dependent: :destroy
...@@ -59,7 +59,7 @@ class Project < ActiveRecord::Base ...@@ -59,7 +59,7 @@ class Project < ActiveRecord::Base
has_many :events, dependent: :destroy has_many :events, dependent: :destroy
has_many :merge_requests, dependent: :destroy, foreign_key: "target_project_id" has_many :merge_requests, dependent: :destroy, foreign_key: "target_project_id"
has_many :fork_merge_requests,dependent: :destroy, foreign_key: "source_project_id", class_name: MergeRequest has_many :fork_merge_requests,dependent: :destroy, foreign_key: "source_project_id", class_name: MergeRequest
has_many :issues, dependent: :destroy, order: "state DESC, created_at DESC" has_many :issues, -> { order "state DESC, created_at DESC" }, dependent: :destroy
has_many :milestones, dependent: :destroy has_many :milestones, dependent: :destroy
has_many :notes, dependent: :destroy has_many :notes, dependent: :destroy
has_many :snippets, dependent: :destroy, class_name: "ProjectSnippet" has_many :snippets, dependent: :destroy, class_name: "ProjectSnippet"
...@@ -77,7 +77,7 @@ class Project < ActiveRecord::Base ...@@ -77,7 +77,7 @@ class Project < ActiveRecord::Base
# Validations # Validations
validates :creator, presence: true validates :creator, presence: true
validates :description, length: { within: 0..2000 } validates :description, length: { maximum: 2000 }, allow_blank: true
validates :name, presence: true, length: { within: 0..255 }, validates :name, presence: true, length: { within: 0..255 },
format: { with: Gitlab::Regex.project_name_regex, format: { with: Gitlab::Regex.project_name_regex,
message: "only letters, digits, spaces & '_' '-' '.' allowed. Letter or digit should be first" } message: "only letters, digits, spaces & '_' '-' '.' allowed. Letter or digit should be first" }
...@@ -87,7 +87,7 @@ class Project < ActiveRecord::Base ...@@ -87,7 +87,7 @@ class Project < ActiveRecord::Base
message: "only letters, digits & '_' '-' '.' allowed. Letter or digit should be first" } message: "only letters, digits & '_' '-' '.' allowed. Letter or digit should be first" }
validates :issues_enabled, :wall_enabled, :merge_requests_enabled, validates :issues_enabled, :wall_enabled, :merge_requests_enabled,
:wiki_enabled, inclusion: { in: [true, false] } :wiki_enabled, inclusion: { in: [true, false] }
validates :issues_tracker_id, length: { within: 0..255 } validates :issues_tracker_id, length: { maximum: 255 }, allow_blank: true
validates :namespace, presence: true validates :namespace, presence: true
validates_uniqueness_of :name, scope: :namespace_id validates_uniqueness_of :name, scope: :namespace_id
... ...
......
...@@ -72,7 +72,7 @@ class User < ActiveRecord::Base ...@@ -72,7 +72,7 @@ class User < ActiveRecord::Base
# #
# Namespace for personal projects # Namespace for personal projects
has_one :namespace, dependent: :destroy, foreign_key: :owner_id, class_name: "Namespace", conditions: 'type IS NULL' has_one :namespace, -> { where type: nil }, dependent: :destroy, foreign_key: :owner_id, class_name: "Namespace"
# Profile # Profile
has_many :keys, dependent: :destroy has_many :keys, dependent: :destroy
...@@ -80,8 +80,7 @@ class User < ActiveRecord::Base ...@@ -80,8 +80,7 @@ class User < ActiveRecord::Base
# Groups # Groups
has_many :users_groups, dependent: :destroy has_many :users_groups, dependent: :destroy
has_many :groups, through: :users_groups has_many :groups, through: :users_groups
has_many :owned_groups, through: :users_groups, source: :group, conditions: { users_groups: { group_access: UsersGroup::OWNER } } has_many :owned_groups, -> { where users_groups: { group_access: UsersGroup::OWNER } }, through: :users_groups, source: :group
# Projects # Projects
has_many :groups_projects, through: :groups, source: :projects has_many :groups_projects, through: :groups, source: :projects
has_many :personal_projects, through: :namespace, source: :projects has_many :personal_projects, through: :namespace, source: :projects
...@@ -94,7 +93,7 @@ class User < ActiveRecord::Base ...@@ -94,7 +93,7 @@ class User < ActiveRecord::Base
has_many :notes, dependent: :destroy, foreign_key: :author_id has_many :notes, dependent: :destroy, foreign_key: :author_id
has_many :merge_requests, dependent: :destroy, foreign_key: :author_id has_many :merge_requests, dependent: :destroy, foreign_key: :author_id
has_many :events, dependent: :destroy, foreign_key: :author_id, class_name: "Event" has_many :events, dependent: :destroy, foreign_key: :author_id, class_name: "Event"
has_many :recent_events, foreign_key: :author_id, class_name: "Event", order: "id DESC" has_many :recent_events, -> { order "id DESC" }, foreign_key: :author_id, class_name: "Event"
has_many :assigned_issues, dependent: :destroy, foreign_key: :assignee_id, class_name: "Issue" has_many :assigned_issues, dependent: :destroy, foreign_key: :assignee_id, class_name: "Issue"
has_many :assigned_merge_requests, dependent: :destroy, foreign_key: :assignee_id, class_name: "MergeRequest" has_many :assigned_merge_requests, dependent: :destroy, foreign_key: :assignee_id, class_name: "MergeRequest"
...@@ -104,7 +103,7 @@ class User < ActiveRecord::Base ...@@ -104,7 +103,7 @@ class User < ActiveRecord::Base
# #
validates :name, presence: true validates :name, presence: true
validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/ } validates :email, presence: true, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/ }
validates :bio, length: { within: 0..255 } validates :bio, length: { maximum: 255 }, allow_blank: true
validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider} validates :extern_uid, allow_blank: true, uniqueness: {scope: :provider}
validates :projects_limit, presence: true, numericality: {greater_than_or_equal_to: 0} validates :projects_limit, presence: true, numericality: {greater_than_or_equal_to: 0}
validates :username, presence: true, uniqueness: true, validates :username, presence: true, uniqueness: true,
...@@ -199,7 +198,7 @@ class User < ActiveRecord::Base ...@@ -199,7 +198,7 @@ class User < ActiveRecord::Base
end end
def by_username_or_id(name_or_id) def by_username_or_id(name_or_id)
where('username = ? OR id = ?', name_or_id, name_or_id).first where('users.username = ? OR users.id = ?', name_or_id, name_or_id.to_i).first
end end
def build_user(attrs = {}, options= {}) def build_user(attrs = {}, options= {})
...@@ -373,7 +372,7 @@ class User < ActiveRecord::Base ...@@ -373,7 +372,7 @@ class User < ActiveRecord::Base
end end
def accessible_deploy_keys def accessible_deploy_keys
DeployKey.in_projects(self.authorized_projects).uniq DeployKey.in_projects(self.authorized_projects.pluck(:id)).uniq
end end
def created_by def created_by
... ...
......
class UsersProjectObserver < BaseObserver class UsersProjectObserver < BaseObserver
def after_commit(users_project)
return if users_project.destroyed?
end
def after_create(users_project) def after_create(users_project)
Event.create( Event.create(
project_id: users_project.project.id, project_id: users_project.project.id,
... ...
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
%li User will be removed from joined projects and groups %li User will be removed from joined projects and groups
%li Personal projects will be left %li Personal projects will be left
%li Owned groups will be left %li Owned groups will be left
= link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", confirm: 'Are you sure?' = link_to 'Unblock user', unblock_admin_user_path(@user), method: :put, class: "btn btn-new", data: { confirm: 'Are you sure?' }
- else - else
.alert .alert
%h4 Block this user %h4 Block this user
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
%li User will be removed from joined projects and groups %li User will be removed from joined projects and groups
%li Personal projects will be left %li Personal projects will be left
%li Owned groups will be left %li Owned groups will be left
= link_to 'Block user', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-remove" = link_to 'Block user', block_admin_user_path(@user), data: { confirm: 'USER WILL BE BLOCKED! Are you sure?' }, method: :put, class: "btn btn-remove"
.alert.alert-error .alert.alert-error
%h4 %h4
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
%li %li
Next groups with all content will be removed: Next groups with all content will be removed:
%strong #{@user.solo_owned_groups.map(&:name).join(', ')} %strong #{@user.solo_owned_groups.map(&:name).join(', ')}
= link_to 'Remove user', [:admin, @user], confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?", method: :delete, class: "btn btn-remove" = link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
.span6 .span6
- if @user.users_groups.present? - if @user.users_groups.present?
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
.pull-right .pull-right
%span.light= user_group.human_access %span.light= user_group.human_access
- unless user_group.owner? - unless user_group.owner?
= link_to group_users_group_path(group, user_group), confirm: remove_user_from_group_message(group, @user), method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do = link_to group_users_group_path(group, user_group), data: { confirm: remove_user_from_group_message(group, @user) }, method: :delete, remote: true, class: "btn-tiny btn btn-remove", title: 'Remove user from group' do
%i.icon-remove.icon-white %i.icon-remove.icon-white
.ui-box .ui-box
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
%span.light= tm.human_access %span.light= tm.human_access
- if tm.respond_to? :project - if tm.respond_to? :project
= link_to project_team_member_path(project, @user), confirm: remove_from_project_team_message(project, @user), remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do = link_to project_team_member_path(project, @user), data: { confirm: remove_from_project_team_message(project, @user) }, remote: true, method: :delete, class: "btn-tiny btn btn-remove", title: 'Remove user from project' do
%i.icon-remove %i.icon-remove
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
%p.cgray %p.cgray
- if current_user.private_token - if current_user.private_token
= text_field_tag "token", current_user.private_token, class: "input-xlarge input-xpadding pull-left" = text_field_tag "token", current_user.private_token, class: "input-xlarge input-xpadding pull-left"
= f.submit 'Reset', confirm: "Are you sure?", class: "btn btn-primary btn-build-token prepend-left-10" = f.submit 'Reset', data: { confirm: "Are you sure?" }, class: "btn btn-primary btn-build-token prepend-left-10"
- else - else
%span You don`t have one yet. Click generate to fix it. %span You don`t have one yet. Click generate to fix it.
= f.submit 'Generate', class: "btn success btn-build-token" = f.submit 'Generate', class: "btn success btn-build-token"
...@@ -70,4 +70,4 @@ ...@@ -70,4 +70,4 @@
%li %li
The following groups will be abandoned. You should transfer or remove them: The following groups will be abandoned. You should transfer or remove them:
%strong #{current_user.solo_owned_groups.map(&:name).join(', ')} %strong #{current_user.solo_owned_groups.map(&:name).join(', ')}
= link_to 'Delete account', user_registration_path, confirm: "REMOVE #{current_user.name}? Are you sure?", method: :delete, class: "btn btn-remove" = link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Compare Compare
- if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref - if can?(current_user, :admin_project, @project) && branch.name != @repository.root_ref
= link_to project_branch_path(@project, branch.name), class: 'btn grouped btn-small remove-row', method: :delete, confirm: 'Removed branch cannot be restored. Are you sure?', remote: true do = link_to project_branch_path(@project, branch.name), class: 'btn grouped btn-small remove-row', method: :delete, data: { confirm: 'Removed branch cannot be restored. Are you sure?'}, remote: true do
%i.icon-trash %i.icon-trash
%p %p
... ...
......
...@@ -3,7 +3,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear ...@@ -3,7 +3,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://sear
xml.title "Recent commits to #{@project.name}:#{@ref}" xml.title "Recent commits to #{@project.name}:#{@ref}"
xml.link :href => project_commits_url(@project, @ref, format: :atom), :rel => "self", :type => "application/atom+xml" xml.link :href => project_commits_url(@project, @ref, format: :atom), :rel => "self", :type => "application/atom+xml"
xml.link :href => project_commits_url(@project, @ref), :rel => "alternate", :type => "text/html" xml.link :href => project_commits_url(@project, @ref), :rel => "alternate", :type => "text/html"
xml.id project_commits_url(@project) xml.id project_commits_url(@project, @ref)
xml.updated @commits.first.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") if @commits.any? xml.updated @commits.first.committed_date.strftime("%Y-%m-%dT%H:%M:%SZ") if @commits.any?
@commits.each do |commit| @commits.each do |commit|
... ...
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
%i.icon-edit %i.icon-edit
Edit Edit
&nbsp; &nbsp;
= link_to project_note_path(@project, note), title: "Remove comment", method: :delete, confirm: 'Are you sure you want to remove this comment?', remote: true, class: "danger js-note-delete" do = link_to project_note_path(@project, note), title: "Remove comment", method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: "danger js-note-delete" do
%i.icon-trash.cred %i.icon-trash.cred
Remove Remove
= image_tag avatar_icon(note.author_email), class: "avatar s32" = image_tag avatar_icon(note.author_email), class: "avatar s32"
...@@ -61,6 +61,6 @@ ...@@ -61,6 +61,6 @@
%i.icon-paper-clip %i.icon-paper-clip
= note.attachment_identifier = note.attachment_identifier
= link_to delete_attachment_project_note_path(@project, note), = link_to delete_attachment_project_note_path(@project, note),
title: "Delete this attachment", method: :delete, remote: true, confirm: 'Are you sure you want to remove the attachment?', class: "danger js-note-attachment-delete" do title: "Delete this attachment", method: :delete, remote: true, data: { confirm: 'Are you sure you want to remove the attachment?' }, class: "danger js-note-attachment-delete" do
%i.icon-trash.cred %i.icon-trash.cred
.clear .clear
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
%i.icon-download-alt %i.icon-download-alt
Download Download
- if can?(current_user, :admin_project, @project) - if can?(current_user, :admin_project, @project)
= link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row', method: :delete, confirm: 'Removed tag cannot be restored. Are you sure?', remote: true do = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
%i.icon-trash %i.icon-trash
= paginate @tags, theme: 'gitlab' = paginate @tags, theme: 'gitlab'
... ...
......