[refs #358] Add git clone repo help hint
This commit is contained in:
parent
916cee3bb3
commit
39dd53ff9b
|
@ -49,4 +49,15 @@ $(document).ready(function() {
|
|||
return false;
|
||||
});
|
||||
|
||||
$('.description-top .git_help').click(function() {
|
||||
$('#git_help_data').toggle();
|
||||
var desc = $('.description-top');
|
||||
|
||||
if ($('#git_help_data').css('display') == 'none') {
|
||||
desc.css('height', '38px');
|
||||
} else {
|
||||
desc.css('height', '200px');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -764,3 +764,18 @@ div.tos_sidebar ul li a {
|
|||
padding-top: 5px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.description-top div.git_help {
|
||||
float: left;
|
||||
margin-top: 11px;
|
||||
margin-left: 10px;
|
||||
font-size: 11px;
|
||||
color: green;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div#git_help_data {
|
||||
display: none;
|
||||
padding-left: 10px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,27 @@
|
|||
.description-top
|
||||
= text_field_tag :url, git_repo_url(project.git_repo_name), :class => 'name', :spellcheck => 'false', :readonly => true
|
||||
.git_help ?
|
||||
.role= can?(:write, project) ? t("layout.read_write_access") : t("layout.read_access")
|
||||
= render :partial => 'projects/branch_select', :locals => {:project => project}
|
||||
#git_help_data
|
||||
= t("layout.projects.git_help.cloning") + ":"
|
||||
%br
|
||||
%br
|
||||
%b git clone #{git_repo_url(project.git_repo_name)} #{project.name}
|
||||
%br
|
||||
%b cd #{project.name}
|
||||
%br
|
||||
%br
|
||||
= t("layout.projects.git_help.remote") + ":"
|
||||
%br
|
||||
%br
|
||||
%b git remote add #{project.name} #{git_repo_url(project.git_repo_name)}
|
||||
%br
|
||||
%b git fetch #{project.name}
|
||||
%br
|
||||
%b git checkout -b my-local-tracking-branch #{project.name}/master_or_other_branch
|
||||
%br
|
||||
%br
|
||||
.both
|
||||
:javascript
|
||||
$(document).ready(function() {
|
||||
|
|
|
@ -30,6 +30,10 @@ en:
|
|||
has_issue_description: Tracker adds a lightweight issue management system tightly integrated with your repository.
|
||||
has_wiki_description: Wikis are the simplest way to allow other users to contribute content. Any user can create and edit pages for documentation, examples, support or anything you wish.
|
||||
|
||||
git_help:
|
||||
cloning: Cloning the repository
|
||||
remote: Add this repository as a remote to an existing local repository
|
||||
|
||||
diff_show_header: "%{files} with %{additions} and %{deletions}."
|
||||
about_subheader: "About project"
|
||||
last_commit: "Last commit"
|
||||
|
|
|
@ -45,6 +45,10 @@ ru:
|
|||
current_commit: Текущий коммит
|
||||
files_in_project: Файлы в
|
||||
|
||||
git_help:
|
||||
cloning: Клонирование этого репозитория
|
||||
remote: Добавление этого репозитория как удаленного к существующему локальному репозиторию
|
||||
|
||||
flash:
|
||||
project:
|
||||
saved: Проект успешно сохранен
|
||||
|
|
Loading…
Reference in New Issue