Skip to content

Commit

Permalink
Fix #336
Browse files Browse the repository at this point in the history
This also reverts previous commit
  • Loading branch information
root committed Jan 29, 2015
1 parent ec11e79 commit 79efb6c
Show file tree
Hide file tree
Showing 9 changed files with 592 additions and 262 deletions.
16 changes: 0 additions & 16 deletions app/helpers/gitolite_plugin_settings_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,6 @@ def render_gitolite_version(version)
end


def render_git_version(version)
major = version.split('.')[0].to_i
minor = version.split('.')[1].to_i
patch = version.split('.')[2].to_i
# Git 1.7 : incompatible
if major == 1 && minor < 8
content_tag(:span, version, class: 'label label-important') + content_tag(:span, l(:label_incompatible_git_version), class: 'git-version')
# Git 1.8.x to 1.8.5 : incompatible
elsif major == 1 && minor == 8 && patch < 5
content_tag(:span, version, class: 'label label-important') + content_tag(:span, l(:label_incompatible_git_version), class: 'git-version')
else
content_tag(:span, version, class: 'label label-success')
end
end


def render_temp_dir_writeable(state, label)
css_class = state ? 'label label-success' : 'label label-important'
content_tag(:span, label, class: css_class)
Expand Down
3 changes: 2 additions & 1 deletion app/views/settings/_gitolite_config_test.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@

%tr
%td= l(:label_git_version)
%td= render_git_version(Repository::Xitolite.scm_version_string)
%td
%span{ class: 'label label-success' }= Repository::Xitolite.scm_version_string

%tr
%td= l(:label_gitolite_version)
Expand Down
4 changes: 0 additions & 4 deletions assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ PLUGIN SETTINGS
margin-top: 15px;
}

.git-version {
font-style: italic;
padding-left: 10px;
}

/*
REPOSITORY EDIT
Expand Down
1 change: 0 additions & 1 deletion config/locales/settings/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ en:
label_redmine_user: Redmine username
label_git_version: Git version
label_gitolite_repository_count: Count of physical repositories in Gitolite
label_incompatible_git_version: Incompatible Git version!

# Recycle Bin
label_tab_gitolite_recycle_bin: Recycle Bin
Expand Down
1 change: 0 additions & 1 deletion config/locales/settings/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ fr:
label_redmine_user: Nom d'utilisateur Redmine
label_git_version: Version de Git
label_gitolite_repository_count: Nombre de dépôts physiques dans Gitolite
label_incompatible_git_version: Version de Git incompatible!

# Recycle Bin
label_tab_gitolite_recycle_bin: Corbeille
Expand Down
Loading

0 comments on commit 79efb6c

Please sign in to comment.