-<img src="{{link '/images/logo.svg'}}" title="{{t 'layout.sonar.slogan'}}">
+<img src="{{link '/images/logo.svg'}}" alt="{{t 'layout.sonar.slogan'}}" title="{{t 'layout.sonar.slogan'}}">
<div class="container">
<div class="navbar-header">
- <a class="navbar-brand" href="{{link '/'}}">{{> '_nav-logo'}}</a>
+ <a class="navbar-brand" href="{{link '/'}}">
+ {{#if logoUrl}}
+ <img src="{{logoUrl}}" {{#if logoWidth}}width="{{logoWidth}}"{{/if}} height="30"
+ alt="{{t 'layout.sonar.slogan'}}" title="{{t 'layout.sonar.slogan'}}">
+ {{else}}
+ {{> '_nav-logo'}}
+ {{/if}}
+ </a>
</div>
<ul class="nav navbar-nav">
end
end
+ def property_by_key(key)
+ Property.by_key(key)
+ end
+
# for backward-compatibility with properties that do not define the type TEXT
def property_type(property, value)
unless property.fields.blank?
name: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>'
}<% if index < pages.size - 1 -%>, <% end %>
<% end %>
- ]
+ ],
+ <%
+ logo_url = property_by_key('sonar.lf.logoUrl')
+ logo_width = property_by_key('sonar.lf.logoWidthPx')
+ %>
+ <%
+ if logo_url
+ %>
+ logoUrl: '<%= escape_javascript property_value(logo_url) -%>',
+ <% end %>
+ <%
+ if logo_width
+ %>
+ logoWidth: '<%= escape_javascript property_value(logo_width) -%>'
+ <% end %>
});
</script>
.deprecatedKey("sonar.branding.image")
.name("Logo URL")
.description("URL to logo image. Any standard format is accepted.")
+ .category(CoreProperties.CATEGORY_GENERAL)
+ .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL)
.build(),
PropertyDefinition.builder("sonar.lf.logoWidthPx")
.deprecatedKey("sonar.branding.image.width")
.name("Width of image in pixels")
.description("Width in pixels, according that the height of image is constrained to 30px.")
+ .category(CoreProperties.CATEGORY_GENERAL)
+ .subCategory(CoreProperties.SUBCATEGORY_LOOKNFEEL)
.build(),
// BATCH
property.category.general.differentialViews=Differential Views
property.category.general.localization=Localization
property.category.general.databaseCleaner=Database Cleaner
+property.category.general.looknfeel=Look & Feel
property.category.security=Security
property.category.security.encryption=Encryption
property.category.java=Java
*/
String SUBCATEGORY_DIFFERENTIAL_VIEWS = "differentialViews";
+ /**
+ * @since 5.1
+ */
+ String SUBCATEGORY_LOOKNFEEL = "looknfeel";
+
/**
* @since 4.0
*/