Commit 3af99f74 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Agrega y disgrega información de servicios

parent 72c8137e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ module.exports = function(grunt) {
						ActivityInspireTheme: true,
						ActivityResources: true,
						ActivityStarred: true,
						ServiceOGCAttribution: true,

						// string
						Capitalize: true
@@ -153,6 +154,7 @@ module.exports = function(grunt) {
				, 'dist/ServiceOGCAtlasDetails.js': 'src/ServiceOGC/AtlasDetails.hbs'
				, 'dist/ServiceOGCTitle.js': 'src/ServiceOGC/Title.hbs'
				, 'dist/ServiceOGCInfo.js': 'src/ServiceOGC/Info.hbs'
				, 'dist/ServiceOGCSourceInfo.js': 'src/ServiceOGC/SourceInfo.hbs'
				, 'dist/ServiceOGCImage.js': 'src/ServiceOGC/Image.hbs'
				, 'dist/TaxonList.js': 'src/Taxon/List.hbs'
				, 'dist/PlaceNamesList.js': 'src/PlaceNames/List.hbs'
+22 −0
Original line number Diff line number Diff line
@@ -77,6 +77,28 @@ define([

				result = '<i title="' + i18n[title] + '" class="' + className + '"></i>';
			}
			return new handlebars.SafeString(result);
		},

		ServiceOGCAttribution: function(attribution) {

			var result;

			if (typeof attribution === 'string') {
				result = attribution;
			} else if (attribution && typeof attribution === 'object') {
				var href = attribution.onlineResource,
					text = attribution.title;

				if (!text) {
					result = '';
				} else if (!href) {
					result = text;
				} else {
					result = '<a href="' + href + '" target="_blank" title="' + href + '">' + text + '</a>';
				}
			}

			return new handlebars.SafeString(result);
		}
	};
+40 −28
Original line number Diff line number Diff line
@@ -4,77 +4,89 @@
			{{#if data.protocols}}
				{{ProtocolsServiceOGC data.protocols i18n}}
			{{/if}}
			{{#if data.name}}
				<div class="rowDest">
			{{#if data.alias}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.nameLayer}}">{{i18n.nameLayer}}</span>
						<span title="{{i18n.alias}}">{{i18n.alias}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.name}}</p>
						<p>{{data.alias}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.srs}}
			{{#if data.description}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.srs}}">{{i18n.srs}}</span>
						<span title="{{i18n.description}}">{{i18n.description}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{Keyword data.srs}}</p>
						<p>{{data.description}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.formats}}
			{{#if data.styles}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.formats}}">{{i18n.formats}}</span>
						<span title="{{i18n.style}}">{{i18n.style}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{ArrayString data.formats}}</p>
						<p>{{Keyword data.styles}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.styleLayer}}
			{{#if data.themeInspire}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.styleLayer}}">{{i18n.styleLayer}}</span>
						<span title="{{i18n.themeInspire}}">{{i18n.themeInspire}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.styleLayer.name}}</p>
					<div class="{{RowColServiceOGCCatalog 'right'}} detailsRowWithBadge">
						{{ActivityInspireTheme data i18n}}
						<span>{{data.themeInspire.name}}</span>
					</div>
				</div>
			{{/if}}
			{{#if data.keyword}}
			{{#if data.updated}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.keywords}}">{{i18n.keywords}}</span>
						<span title="{{i18n.updated}}">{{i18n.updated}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{Keyword data.keyword}}</p>
						<p>{{DateTime data.updated}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.abstractLayer}}
			{{#if data.inserted}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.abstractLayer}}">{{i18n.abstractLayer}}</span>
						<span title="{{i18n.updated}}">{{i18n.inserted}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.abstractLayer}}</p>
						<p>{{DateTime data.inserted}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.contact}}
			<div>
				<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.contact}}">{{i18n.contact}}</span>
					<span title="{{i18n.shownInAtlas}}">{{i18n.shownInAtlas}}</span>
				</div>
					<div class="{{RowColServiceOGCCatalog 'right'}} detailsRowFlex">
						{{#if data.contact.organization}}<p>{{data.contact.organization}}</p>{{/if}}
						{{#if data.contact.name}}<p>{{data.contact.name}}</p>{{/if}}
						{{#if data.contact.address}}<p>{{data.contact.address}}</p>{{/if}}
						{{#if data.contact.email}}<p>{{Email data.contact.email}}</p>{{/if}}
						{{#if data.contact.phone}}<p>{{data.contact.phone}}</p>{{/if}}
				<div class="{{RowColServiceOGCCatalog 'right'}}">
					<p>
						{{#if data.atlas}}
							{{i18n.enabled}}
						{{/if}}
						{{#unless data.atlas}}
							{{i18n.disabled}}
						{{/unless}}
					</p>
				</div>
			</div>
			{{#if data.refresh}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.layerRefreshInterval}}">{{i18n.layerRefreshInterval}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.refresh}} {{i18n.seconds}}</p>
					</div>
				</div>
			{{/if}}
+132 −0
Original line number Diff line number Diff line
<div class="content">
	<div class="grid">
		<div class="contentGrid">
			{{#if data.title}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.title}}">{{i18n.title}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.title}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.name}}
				<div class="rowDest">
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.nameLayer}}">{{i18n.nameLayer}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.name}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.abstractLayer}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.abstractLayer}}">{{i18n.abstractLayer}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{data.abstractLayer}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.srs}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.srs}}">{{i18n.srs}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{Keyword data.srs}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.stylesLayer}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.styleLayer}}">{{i18n.styleLayer}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>
						{{#each data.stylesLayer}}
							{{#if @index}}
								|
							{{/if}}
							{{this.name}}
						{{/each}}
						</p>
					</div>
				</div>
			{{/if}}
			{{#if data.keywords}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.keywords}}">{{i18n.keywords}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{Keyword data.keywords}}</p>
					</div>
				</div>
			{{/if}}
			<div>
				<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
					<span title="{{i18n.queryable}}">{{i18n.queryable}}</span>
				</div>
				<div class="{{RowColServiceOGCCatalog 'right'}}">
					<p>
						{{#if data.abstractLayer}}
							{{i18n.enabled}}
						{{/if}}
						{{#unless data.abstractLayer}}
							{{i18n.disabled}}
						{{/unless}}
					</p>
				</div>
			</div>
			{{#if data.formats}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.formats}}">{{i18n.formats}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{ArrayString data.formats}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.attribution}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.attribution}}">{{i18n.attribution}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						<p>{{ServiceOGCAttribution data.attribution}}</p>
					</div>
				</div>
			{{/if}}
			{{#if data.contact}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.contact}}">{{i18n.contact}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}} detailsRowFlex">
						{{#if data.contact.organization}}<p>{{data.contact.organization}}</p>{{/if}}
						{{#if data.contact.name}}<p>{{data.contact.name}}</p>{{/if}}
						{{#if data.contact.address}}<p>{{data.contact.address}}</p>{{/if}}
						{{#if data.contact.email}}<p>{{Email data.contact.email}}</p>{{/if}}
						{{#if data.contact.phone}}<p>{{data.contact.phone}}</p>{{/if}}
					</div>
				</div>
			{{/if}}
			{{#if data.urlSource}}
				<div>
					<div class="rowLeft inlineRow {{RowColServiceOGCCatalog 'left'}}">
						<span title="{{i18n.urlSource}}">{{i18n.urlSource}}</span>
					</div>
					<div class="{{RowColServiceOGCCatalog 'right'}}">
						{{data.urlSource}}
					</div>
				</div>
			{{/if}}
		</div>
	</div>
</div>