rosa-build/app/views/wiki/_git_access.html.haml

18 lines
584 B
Plaintext
Raw Normal View History

2012-02-17 11:13:54 +00:00
.name
= link_to t("wiki.clones.http"), git_repo_url(@project.wiki_repo_name), :'data-permissions' => (can? :write, @project) ? 'Read+Write' : 'Read'
2012-02-17 11:13:54 +00:00
#url-field{:style => 'display: inline'}
.role
2012-01-20 15:01:59 +00:00
:javascript
$(document).ready(function() {
2012-02-17 11:13:54 +00:00
var link = $('.name a').first();
2012-01-20 15:01:59 +00:00
2012-02-17 11:13:54 +00:00
$('.name #url-field').text(link.attr('href'));
$('.role').text(link.attr('data-permissions'));
2012-01-20 15:01:59 +00:00
2012-02-17 11:13:54 +00:00
$('.name a').live('click', function(e) {
2012-01-20 15:01:59 +00:00
e.preventDefault();
2012-02-17 11:13:54 +00:00
$('.name #url-field').text($(this).attr('href'));
$('.role').text($(this).attr('data-permissions'));
2012-01-20 15:01:59 +00:00
});
});