Merge branch 'master' into discussions

Conflicts:
	app/assets/stylesheets/main.scss
	app/models/project.rb
	app/views/notes/_common_form.html.haml
	app/views/notes/_per_line_form.html.haml
	lib/gitlab/markdown.rb
	spec/models/note_spec.rb
This commit is contained in:
Riyad Preukschas 2012-12-23 01:03:57 +01:00
commit db2c15369c
276 changed files with 4466 additions and 2603 deletions

View file

@ -17,13 +17,6 @@
.controls
= text_field_tag :ppath, @project.path_to_repo, class: "xxlarge", readonly: true
.control-group
= f.label :namespace_id do
%span Namespace
.controls
= f.select :namespace_id, namespaces_options(@project.namespace_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
 
%span.cred Be careful. Changing project namespace can have unintended side effects
- unless @project.heads.empty?
.clearfix
@ -57,11 +50,28 @@
= f.check_box :wiki_enabled
%span.descr Pages for project documentation
- if can? current_user, :change_namespace, @project
%fieldset.features
%legend Transfer:
.control-group
= f.label :namespace_id do
%span Namespace
.controls
= f.select :namespace_id, namespaces_options(@project.namespace_id || Namespace::global_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
%br
%ul.prepend-top-10.cred
%li Be careful. Changing project namespace can have unintended side effects
%li You can transfer project only to namespaces you can manage
%li You will need to update your local repositories to point to the new location.
%br
.actions
= f.submit 'Save', class: "btn save-btn"
= link_to 'Cancel', @project, class: "btn"
- unless @project.new_record?
.right
= link_to 'Remove', @project, confirm: 'Are you sure?', method: :delete, class: "btn danger"
- if can?(current_user, :remove_project, @project)
.right
= link_to 'Remove', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn danger"

View file

@ -9,3 +9,4 @@
$('.project_new_holder').show();
$("#new_project").replaceWith("#{escape_javascript(render('new_form'))}");
$('.save-project-loader').hide();
new Projects();

View file

@ -29,6 +29,6 @@
git remote add origin #{@project.url_to_repo}
git push -u origin master
- if can? current_user, :admin_project, @project
- 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"

View file

@ -17,7 +17,6 @@
= time_ago_in_words(note.created_at)
ago
- else
.alert-message.block-message
%span All files attached to project wall, issues etc will be displayed here
%p.slead All files attached to project wall, issues etc will be displayed here

View file

@ -2,13 +2,15 @@
%br
.graph_holder
%h4
%small You can move around the graph by using arrow keys.
%small You can move around the graph by using the arrow keys.
#holder.graph
.loading.loading-gray
:javascript
var chunk1={commits:#{@commits_json}};
var days=#{@days_json};
initGraph();
var branch_graph;
$(function(){
branchGraph($("#holder")[0]);
GraphNav.init();
branch_graph = new BranchGraph($("#holder"), {
url: '#{url_for controller: 'projects', action: 'graph', format: :json}',
commit_url: '#{url_for controller: 'projects', action: 'show'}/commits/%s'
});
});

View file

@ -0,0 +1,2 @@
:plain
$(".save-project-loader").replaceWith(errorMessage('#{escape_javascript(@error.message)}'));