<commit_before>/**
 * Copyright (c) 2011, <NAME> <<EMAIL>>
 * Copyright (c) 2012, <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

OC.Settings = OC.Settings || {};
OC.Settings.Apps = OC.Settings.Apps || {
	loadApp:function(app) {
		var page = $('#app-content');
		page.find('p.license').show();
		page.find('span.name').text(app.name);
		page.find('small.externalapp').text(app.internallabel);
		if (app.version) {
			page.find('span.version').text(app.version);
		} else {
			page.find('span.version').text('');
		}
		page.find('span.score').html(app.score);
		page.find('p.description').text(app.description);
		page.find('img.preview').attr('src', app.preview);
		if (app.preview && app.preview.length) {
			page.find('img.preview').show();
		} else {
			page.find('img.preview').hide();
		}
		page.find('small.externalapp').attr('style', 'visibility:visible');
		page.find('span.author').text(app.author);

		// FIXME licenses of downloaded apps go into app.licence, licenses of not-downloaded apps into app.license
		var appLicense = '';
		if (typeof(app.licence) !== 'undefined') {
			appLicense = app.licence;
		} else if (typeof(app.license) !== 'undefined') {
			appLicense = app.license;
		}
		page.find('span.licence').text(appLicense);

		var userDocumentation = false;
		var adminDocumentation = false;
		if (typeof(app.documentation) !== 'undefined') {
			if (typeof(app.documentation.user) !== 'undefined') {
				userDocumentation = true;
				page.find('span.userDocumentation').html("<a id='userDocumentation' href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>");
				page.find('p.documentation').show();
			}
			if (typeof(app.documentation.admin) !== 'undefined') {
				adminDocumentation = true;
				page.find('span.adminDocumentation').html("<a id='adminDocumentation' href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>");
				page.find('p.documentation').show();
			}

			if(userDocumentation && adminDocumentation) {
				page.find('span.userDocumentation').after(', ');
			}
		}
<commit_msg>app manager forgets the documentation links<commit_after>/**
 * Copyright (c) 2011, <NAME> <<EMAIL>>
 * Copyright (c) 2012, <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

OC.Settings = OC.Settings || {};
OC.Settings.Apps = OC.Settings.Apps || {
	loadApp:function(app) {
		var page = $('#app-content');
		page.find('p.license').show();
		page.find('span.name').text(app.name);
		page.find('small.externalapp').text(app.internallabel);
		if (app.version) {
			page.find('span.version').text(app.version);
		} else {
			page.find('span.version').text('');
		}
		page.find('span.score').html(app.score);
		page.find('p.description').text(app.description);
		page.find('img.preview').attr('src', app.preview);
		if (app.preview && app.preview.length) {
			page.find('img.preview').show();
		} else {
			page.find('img.preview').hide();
		}
		page.find('small.externalapp').attr('style', 'visibility:visible');
		page.find('span.author').text(app.author);

		// FIXME licenses of downloaded apps go into app.licence, licenses of not-downloaded apps into app.license
		var appLicense = '';
		if (typeof(app.licence) !== 'undefined') {
			appLicense = app.licence;
		} else if (typeof(app.license) !== 'undefined') {
			appLicense = app.license;
		}
		page.find('span.licence').text(appLicense);

		var userDocumentation = false;
		var adminDocumentation = false;
		if (typeof(app.documentation) !== 'undefined') {
			if (typeof(app.documentation.user) !== 'undefined') {
				userDocumentation = true;
				page.find('span.userDocumentation').html("<a id='userDocumentation' href='" + app.documentation.user + "'>" + t('settings', 'User Documentation') + "</a>");
				page.find('p.documentation').show();
			}
			else {
				page.find('span.userDocumentation').empty();
				userDocumentation = false;
			}
			if (typeof(app.documentation.admin) !== 'undefined') {
				adminDocumentation = true;
				page.find('span.adminDocumentation').html("<a id='adminDocumentation' href='" + app.documentation.admin + "'>" + t('settings', 'Admin Documentation') + "</a>");
				page.find('p.documentation').show();
			}
			else {
				page.find('span.adminDocumentation').empty();
				adminDocumentation = false;
			}

			if(userDocumentation && adminDocumentation) {
				page.find('span.comma').remove();
				page.find('span.userDocumentation').after('<span class="comma">, </span>');
			}
			else {
				page.find('span.comma').remove();
			}
		}
		else {
			page.find('p.documentation').hide();
		}

{'fraction_non_alphanumeric': 0.19734345351043645, 'fraction_numerical': 0.003795066413662239, 'mean_word_length': 4.218921892189219, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '191315', 'n_tokens_mistral': 1732, 'n_tokens_neox': 1516, 'n_words': 272}