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

18 lines
584 B
Plaintext

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