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

refactor buttons pt2

parent 033aa1a8
No related branches found
No related tags found
2 merge requests!2940Expanding repos and hooks paths in settings,!2770Capistrano deploy
Loading
Loading
@@ -23,9 +23,9 @@
- if current_user == user
%span.btn.disabled This is you!
- if @team.owner == user
%span.btn.disabled.success Owner
%span.btn.disabled.btn-success Owner
- elsif user.blocked
%span.btn.disabled.blocked Blocked
- elsif allow_admin
= link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "very_small btn btn-remove" do
= link_to team_member_path(@team, user), confirm: remove_from_user_team_message(@team, user), method: :delete, class: "btn-tiny btn btn-remove" do
%i.icon-minus.icon-white
Loading
Loading
@@ -29,7 +29,7 @@
 
- if current_user.can?(:admin_user_team, @team)
%td.bgred
= link_to 'Edit max access', edit_team_project_path(@team, project), class: "btn small"
= link_to 'Edit max access', edit_team_project_path(@team, project), class: "btn btn-small"
= link_to 'Relegate', team_project_path(@team, project), confirm: 'Remove project from team and move to global namespace. Are you sure?', method: :delete, class: "btn btn-remove small"
 
- else
Loading
Loading
.projects
.activities.span8
= link_to dashboard_path, class: 'btn very_small' do
= link_to dashboard_path, class: 'btn btn-tiny' do
← To dashboard
 
%span.cgray Events and projects are filtered in scope of team
Loading
Loading
.btn-group.tree-btn-group
-# only show edit link for text files
- if @tree.text?
= link_to "edit", edit_project_tree_path(@project, @id), class: "btn very_small", disabled: !allowed_tree_edit?
= link_to "raw", project_blob_path(@project, @id), class: "btn very_small", target: "_blank"
= link_to "edit", edit_project_tree_path(@project, @id), class: "btn btn-tiny", disabled: !allowed_tree_edit?
= link_to "raw", project_blob_path(@project, @id), class: "btn btn-tiny", target: "_blank"
-# only show normal/blame view links for text files
- if @tree.text?
- if current_page? project_blame_path(@project, @id)
= link_to "normal view", project_tree_path(@project, @id), class: "btn very_small"
= link_to "normal view", project_tree_path(@project, @id), class: "btn btn-tiny"
- else
= link_to "blame", project_blame_path(@project, @id), class: "btn very_small"
= link_to "history", project_commits_path(@project, @id), class: "btn very_small"
= link_to "blame", project_blame_path(@project, @id), class: "btn btn-tiny"
= link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny"
Loading
Loading
@@ -24,7 +24,7 @@
%th Name
%th Last Update
%th Last Commit
%th= link_to "history", project_commits_path(@project, @id), class: "btn very_small right"
%th= link_to "history", project_commits_path(@project, @id), class: "btn btn-tiny right"
 
- if tree.up_dir?
%tr.tree-item
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@
%strong= @ref
%span.options
.btn-group.tree-btn-group
= link_to "Cancel", project_tree_path(@project, @id), class: "btn very_small btn-cancel", confirm: "Are you sure?"
= link_to "Cancel", project_tree_path(@project, @id), class: "btn btn-tiny btn-cancel", confirm: "Are you sure?"
.file_content.code
%pre#editor= @tree.data
 
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@
= @user.name
- if @user == current_user
.right
= link_to profile_path, class: 'btn small' do
= link_to profile_path, class: 'btn btn-small' do
%i.icon-edit
Edit Profile
%br
Loading
Loading
Loading
Loading
@@ -4,5 +4,5 @@
 
.right
- if can? current_user, :admin_wiki, @project
= link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn small btn-remove" do
= link_to project_wiki_path(@project, @wiki), confirm: "Are you sure you want to delete this page?", method: :delete, class: "btn btn-small btn-remove" do
Delete this page
\ No newline at end of file
%h3.page_title
= @wiki.title
%span.right
= link_to pages_project_wikis_path(@project), class: "btn small grouped" do
= link_to pages_project_wikis_path(@project), class: "btn btn-small grouped" do
Pages
- if can? current_user, :write_wiki, @project
= link_to history_project_wiki_path(@project, @wiki), class: "btn small grouped" do
= link_to history_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
History
= link_to edit_project_wiki_path(@project, @wiki), class: "btn small grouped" do
= link_to edit_project_wiki_path(@project, @wiki), class: "btn btn-small grouped" do
%i.icon-edit
Edit
%br
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