...@@ -212,12 +212,12 @@ export default { ...@@ -212,12 +212,12 @@ export default {
</script> </script>
<template> <template>
<td :colspan="colspan"> <td :colspan="colspan" class="text-center">
<div class="content js-line-expansion-content"> <div class="content js-line-expansion-content">
<a <a
v-if="canExpandUp" v-if="canExpandUp"
v-tooltip v-tooltip
class="cursor-pointer js-unfold unfold-icon" class="cursor-pointer js-unfold unfold-icon d-inline-block pt-2 pb-2"
data-placement="top" data-placement="top"
data-container="body" data-container="body"
:title="__('Expand up')" :title="__('Expand up')"
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
<a <a
v-if="canExpandDown" v-if="canExpandDown"
v-tooltip v-tooltip
class="cursor-pointer js-unfold-down has-tooltip unfold-icon" class="cursor-pointer js-unfold-down has-tooltip unfold-icon d-inline-block pt-2 pb-2"
data-placement="top" data-placement="top"
data-container="body" data-container="body"
:title="__('Expand down')" :title="__('Expand down')"
... ...
......
...@@ -16,3 +16,16 @@ ...@@ -16,3 +16,16 @@
color: $dark-diff-match-bg; color: $dark-diff-match-bg;
background: $dark-diff-match-color; background: $dark-diff-match-color;
} }
@mixin diff-expansion($background, $border, $link) {
background-color: $background;
td {
border-top: 1px solid $border;
border-bottom: 1px solid $border;
}
a {
color: $link;
}
}
...@@ -111,6 +111,10 @@ $dark-il: #de935f; ...@@ -111,6 +111,10 @@ $dark-il: #de935f;
color: $dark-line-color; color: $dark-line-color;
} }
.line_expansion {
@include diff-expansion($dark-main-bg, $dark-border, $dark-na);
}
// Diff line // Diff line
.line_holder { .line_holder {
&.match .line_content, &.match .line_content,
... ...
......
...@@ -111,6 +111,10 @@ $monokai-gi: #a6e22e; ...@@ -111,6 +111,10 @@ $monokai-gi: #a6e22e;
color: $monokai-text-color; color: $monokai-text-color;
} }
.line_expansion {
@include diff-expansion($monokai-bg, $monokai-border, $monokai-k);
}
// Diff line // Diff line
.line_holder { .line_holder {
&.match .line_content, &.match .line_content,
... ...
......
...@@ -34,8 +34,11 @@ ...@@ -34,8 +34,11 @@
color: $gl-text-color; color: $gl-text-color;
} }
// Diff line .line_expansion {
@include diff-expansion($gray-light, $white-normal, $gl-text-color);
}
// Diff line
$none-over-bg: #ded7fc; $none-over-bg: #ded7fc;
$none-expanded-border: #e0e0e0; $none-expanded-border: #e0e0e0;
$none-expanded-bg: #e0e0e0; $none-expanded-bg: #e0e0e0;
... ...
......
...@@ -115,6 +115,10 @@ $solarized-dark-il: #2aa198; ...@@ -115,6 +115,10 @@ $solarized-dark-il: #2aa198;
color: $solarized-dark-pre-color; color: $solarized-dark-pre-color;
} }
.line_expansion {
@include diff-expansion($solarized-dark-line-bg, $solarized-dark-border, $solarized-dark-kd);
}
// Diff line // Diff line
.line_holder { .line_holder {
&.match .line_content, &.match .line_content,
... ...
......
...@@ -122,6 +122,10 @@ $solarized-light-il: #2aa198; ...@@ -122,6 +122,10 @@ $solarized-light-il: #2aa198;
color: $solarized-light-pre-color; color: $solarized-light-pre-color;
} }
.line_expansion {
@include diff-expansion($solarized-light-line-bg, $solarized-light-border, $solarized-light-kd);
}
// Diff line // Diff line
.line_holder { .line_holder {
&.match .line_content, &.match .line_content,
... ...
......
...@@ -101,24 +101,8 @@ pre.code, ...@@ -101,24 +101,8 @@ pre.code,
color: $white-code-color; color: $white-code-color;
} }
// Expansion line
.line_expansion { .line_expansion {
background-color: $gray-light; @include diff-expansion($gray-light, $border-color, $blue-600);
td {
border-top: 1px solid $border-color;
border-bottom: 1px solid $border-color;
text-align: center;
}
a {
color: $blue-600;
}
.unfold-icon {
display: inline-block;
padding: 8px 0;
}
} }
// Diff line // Diff line
... ...
......
...@@ -106,9 +106,9 @@ module NotificationsHelper ...@@ -106,9 +106,9 @@ module NotificationsHelper
end end
end end
def notification_setting_icon(notification_setting) def notification_setting_icon(notification_setting = nil)
sprite_icon( sprite_icon(
notification_setting.disabled? ? "notifications-off" : "notifications", !notification_setting.present? || notification_setting.disabled? ? "notifications-off" : "notifications",
css_class: "icon notifications-icon js-notifications-icon" css_class: "icon notifications-icon js-notifications-icon"
) )
end end
... ...
......
...@@ -44,6 +44,10 @@ class BaseService ...@@ -44,6 +44,10 @@ class BaseService
model.errors.add(:visibility_level, "#{level_name} has been restricted by your GitLab administrator") model.errors.add(:visibility_level, "#{level_name} has been restricted by your GitLab administrator")
end end
def visibility_level
params[:visibility].is_a?(String) ? Gitlab::VisibilityLevel.level_value(params[:visibility]) : params[:visibility_level]
end
private private
def error(message, http_status = nil) def error(message, http_status = nil)
... ...
......
...@@ -12,7 +12,7 @@ class CreateSnippetService < BaseService ...@@ -12,7 +12,7 @@ class CreateSnippetService < BaseService
PersonalSnippet.new(params) PersonalSnippet.new(params)
end end
unless Gitlab::VisibilityLevel.allowed_for?(current_user, params[:visibility_level]) unless Gitlab::VisibilityLevel.allowed_for?(current_user, snippet.visibility_level)
deny_visibility_level(snippet) deny_visibility_level(snippet)
return snippet return snippet
end end
... ...
......
...@@ -68,9 +68,5 @@ module Groups ...@@ -68,9 +68,5 @@ module Groups
true true
end end
def visibility_level
params[:visibility].present? ? Gitlab::VisibilityLevel.level_value(params[:visibility]) : params[:visibility_level]
end
end end
end end
...@@ -12,7 +12,7 @@ class UpdateSnippetService < BaseService ...@@ -12,7 +12,7 @@ class UpdateSnippetService < BaseService
def execute def execute
# check that user is allowed to set specified visibility_level # check that user is allowed to set specified visibility_level
new_visibility = params[:visibility_level] new_visibility = visibility_level
if new_visibility && new_visibility.to_i != snippet.visibility_level if new_visibility && new_visibility.to_i != snippet.visibility_level
unless Gitlab::VisibilityLevel.allowed_for?(current_user, new_visibility) unless Gitlab::VisibilityLevel.allowed_for?(current_user, new_visibility)
... ...
......
...@@ -11,5 +11,5 @@ ...@@ -11,5 +11,5 @@
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})(); })();
<noscript><p><img src="//#{extra_config.piwik_url}/piwik.php?idsite=#{extra_config.piwik_site_id}" style="border:0;" alt="" /></p></noscript> <noscript><p><img src="//#{extra_config.piwik_url}/piwik.php?idsite=#{extra_config.piwik_site_id}" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code --> <!-- End Piwik Code -->
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
= s_('Preferences|Layout width') = s_('Preferences|Layout width')
= f.select :layout, layout_choices, {}, class: 'select2' = f.select :layout, layout_choices, {}, class: 'select2'
.form-text.text-muted .form-text.text-muted
= s_('Preferences|Choose between fixed (max. 1280px) and fluid (100%%) application layout.') = s_('Preferences|Choose between fixed (max. 1280px) and fluid (%{percentage}) application layout.').html_safe % { percentage: '100%' }
.form-group .form-group
= f.label :dashboard, class: 'label-bold' do = f.label :dashboard, class: 'label-bold' do
= s_('Preferences|Default dashboard') = s_('Preferences|Default dashboard')
... ...
......
...@@ -139,7 +139,9 @@ ...@@ -139,7 +139,9 @@
- if signed_in - if signed_in
- if issuable_sidebar[:project_emails_disabled] - if issuable_sidebar[:project_emails_disabled]
.block.js-emails-disabled .block.js-emails-disabled
= notification_description(:owner_disabled) .sidebar-collapsed-icon.has-tooltip{ title: notification_description(:owner_disabled), data: { placement: "left", container: "body", boundary: 'viewport' } }
= notification_setting_icon
.hide-collapsed= notification_description(:owner_disabled)
- else - else
.js-sidebar-subscriptions-entry-point .js-sidebar-subscriptions-entry-point
... ...
......
---
title: Add syntax highlighting for line expansion
merge_request: 31821
author:
type: fixed
---
title: Fix upload URLs in Markdown for users without access to project repository
merge_request: 32448
author:
type: fixed
---
title: Fix issuable sidebar icon on notification disabled
merge_request: 32134
author:
type: fixed
---
title: Fix N+1 Gitaly calls in /api/v4/projects/:id/issues
merge_request: 32171
author:
type: performance