-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tidy up work, rename files and make new helper
- Loading branch information
1 parent
e8e2fa9
commit f726ab0
Showing
9 changed files
with
106 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
//= link_tree ../images | ||
//= link application.js | ||
//= link design-system.js | ||
//= link application.css | ||
|
||
//= link legacy-application.js | ||
//= link legacy-application.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,2 @@ | ||
//= require select2 | ||
//= require jquery-ui/widgets/sortable | ||
//= require moment | ||
//= require mousetrap | ||
//= require jquery-ui.custom.min | ||
//= require_directory ./vendor | ||
//= require_directory . | ||
//= require_directory ./modules | ||
//= require jquery_nested_form | ||
|
||
// System wide behaviours | ||
$(function () { | ||
$('a.preview').attr('target', '_blank') | ||
$('form.preview').attr('target', '_blank') | ||
$('.select2').select2({ allowClear: true }) | ||
}) | ||
|
||
// System wide library functions | ||
var GovUKGuideUtils = { // eslint-disable-line no-unused-vars | ||
convertToSlug: function (title) { | ||
return title.toLowerCase().replace(/[^\w ]+/g, '').replace(/ +/g, '-') | ||
} | ||
} | ||
//= require govuk_publishing_components/dependencies | ||
//= require govuk_publishing_components/all_components |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//= require select2 | ||
//= require jquery-ui/widgets/sortable | ||
//= require moment | ||
//= require mousetrap | ||
//= require jquery-ui.custom.min | ||
//= require_directory ./vendor | ||
//= require_directory . | ||
//= require_directory ./modules | ||
//= require jquery_nested_form | ||
|
||
// System wide behaviours | ||
$(function () { | ||
$('a.preview').attr('target', '_blank') | ||
$('form.preview').attr('target', '_blank') | ||
$('.select2').select2({ allowClear: true }) | ||
}) | ||
|
||
// System wide library functions | ||
var GovUKGuideUtils = { // eslint-disable-line no-unused-vars | ||
convertToSlug: function (title) { | ||
return title.toLowerCase().replace(/[^\w ]+/g, '').replace(/ +/g, '-') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,2 @@ | ||
@import "govuk_admin_template"; | ||
@import "select2"; | ||
@import "./vendor/select2-bootstrap"; | ||
@import "colors"; | ||
@import "bootstrap_and_overrides"; | ||
@import "forms"; | ||
|
||
// Components | ||
@import "sidebar_nav"; | ||
@import "sortable_accordion"; | ||
@import "sortable_table"; | ||
@import "panel_part"; | ||
@import "diff"; | ||
@import "notes"; | ||
@import "workflow"; | ||
@import "broken_links_report"; | ||
@import "error_summary"; | ||
|
||
// Pages | ||
@import "downtime"; | ||
@import "smart_answer_builder"; | ||
@import "smart_answer_flowchart"; | ||
|
||
// GOVUK Design System | ||
@import "govuk_publishing_components/all_components"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@import "govuk_admin_template"; | ||
@import "select2"; | ||
@import "./vendor/select2-bootstrap"; | ||
@import "colors"; | ||
@import "bootstrap_and_overrides"; | ||
@import "forms"; | ||
|
||
// Components | ||
@import "sidebar_nav"; | ||
@import "sortable_accordion"; | ||
@import "sortable_table"; | ||
@import "panel_part"; | ||
@import "diff"; | ||
@import "notes"; | ||
@import "workflow"; | ||
@import "broken_links_report"; | ||
@import "error_summary"; | ||
|
||
// Pages | ||
@import "downtime"; | ||
@import "smart_answer_builder"; | ||
@import "smart_answer_flowchart"; | ||
|
||
// GOVUK Design System | ||
@import "govuk_publishing_components/all_components"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module NavigationItemsHelper | ||
# [ | ||
# { | ||
# text: "Publications", href: root_path | ||
# }, | ||
# ].concat(current_user.govuk_editor? ? [ | ||
# { text: 'Add artefact', href: new_artefact_path }, | ||
# { text: 'Downtime', href: downtimes_path } | ||
# ]: []).concat([ | ||
# { text: 'Reports', href: reports_path }, | ||
# { text: 'Search by user', href: user_search_path }, | ||
# { text: 'Sign out', href: '/auth/gds/sign_out' } | ||
# ] | ||
|
||
def navigation_items(is_editor) | ||
list = [ | ||
{ text: "Publications", href: root_path } | ||
] | ||
|
||
if is_editor | ||
list << { text: 'Add artefact', href: new_artefact_path } | ||
list << { text: 'Downtime', href: downtimes_path } | ||
end | ||
|
||
list << { text: 'Reports', href: reports_path } | ||
list << { text: 'Search by user', href: user_search_path } | ||
list << { text: 'Sign out', href: '/auth/gds/sign_out' } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters