-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8270 from dmarcoux/bootstrap-status-messages
Replace Bento views by Bootstrap views for Webui::MainController
- Loading branch information
Showing
25 changed files
with
74 additions
and
237 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
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,7 +1,9 @@ | ||
- unless CONFIG['sponsors'].nil? or CONFIG['sponsors'].empty? | ||
- if CONFIG['sponsors'].present? | ||
- sponsor = CONFIG['sponsors'].sample | ||
.box.box-shadow.centered | ||
%h2.box-header Sponsor | ||
= link_to(sprite_tag(sponsor['icon']), sponsor['url'], { title: sponsor['name'] }) | ||
%p | ||
%em= sponsor['description'] | ||
.card.mb-3 | ||
%h5.card-header Sponsor | ||
.card-body.text-center | ||
%figure.figure.mb-0 | ||
= link_to(sprite_tag(sponsor['icon'], class: 'figure-img img-fluid'), sponsor['url'], title: sponsor['name']) | ||
%figcaption.figure-caption | ||
= sponsor['description'] |
File renamed without changes.
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,29 +1,16 @@ | ||
- if @status_messages.present? || User.admin_session? | ||
.box.box-shadow#messages | ||
%h2.box-header | ||
Announcements | ||
\#{link_to('', news_feed_path(format: 'rss'), { class: 'alignright icons-feeds', title: 'RSS Feed' })} | ||
- @status_messages.each do |msg| | ||
.grid_4.news-sender | ||
= user_with_realname_and_icon msg.user, short: true | ||
wrote #{time_ago_in_words(msg.created_at)} ago | ||
.clear | ||
.grid_4.box.news-message | ||
- if User.admin_session? | ||
= link_to(sprite_tag('comment_delete', title: 'Remove status message'), | ||
{ controller: 'status_messages', action: 'destroy_status_message_dialog', id: msg.id }, | ||
{ remote: true, class: 'delete-message' }) | ||
- case msg.severity.to_i | ||
- when 3 | ||
= sprite_tag('exclamation', alt: 'Red') | ||
- when 2 | ||
= sprite_tag('error', alt: 'Yellow') | ||
- when 1 | ||
= sprite_tag('accept', alt: 'Green') | ||
- else | ||
= sprite_tag('information', alt: 'Information') | ||
= render_as_markdown(msg.message) | ||
.clear | ||
.card.mb-3 | ||
.card-header.d-flex.justify-content-between | ||
%h5 | ||
News | ||
.float-right | ||
= link_to(news_feed_path(format: 'rss'), title: 'RSS Feed') do | ||
%i.fa.fa-rss | ||
.list-group | ||
- @status_messages.each do |message| | ||
= render partial: 'status_message', locals: { message: message } | ||
- if User.admin_session? | ||
%p | ||
= link_to(sprite_tag('comment_add') + content_tag(:span, 'Add new status message', id: "add-new-message"), { controller: 'status_messages', action: 'create_status_message_dialog' }, { remote: true }) | ||
.card-footer | ||
= link_to('#', 'data-toggle': 'modal', 'data-target': '#status-message-modal') do | ||
%i.fas.fa-plus-circle.text-primary | ||
Add status message | ||
= render partial: 'add_status_message_modal' |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,8 +1,8 @@ | ||
- @pagetitle = "About" | ||
%h2 About | ||
- @pagetitle = 'About' | ||
%h2= @pagetitle | ||
%p | ||
This is the web interface for the #{@configuration['title']}. | ||
%p | ||
Check the | ||
%a{ href: "http://openbuildservice.org" } Open Build Service project page | ||
%a{ href: 'http://openbuildservice.org' } Open Build Service project page | ||
for details about the software behind it. |
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,30 +1,29 @@ | ||
- @pagetitle = 'Welcome' | ||
- @layouttype = 'custom' | ||
.grid_11.alpha | ||
.box.box-shadow | ||
%h1.mainhead | ||
Welcome to #{@configuration['title']} | ||
= raw @configuration['description'] | ||
%br/ | ||
%ul#proceed-list | ||
- if User.admin_session? | ||
= proceed_link 'configure', 'Configuration', controller: 'configuration', action: 'index' | ||
= proceed_link 'list', 'All Projects', controller: 'project' | ||
= proceed_link 'system-search', 'Search', controller: 'search', action: 'index' | ||
- else | ||
= proceed_link 'start-here', 'Your Home', user_show_path(User.session!) if User.session | ||
= proceed_link 'list', 'All Projects', controller: 'project' | ||
= proceed_link 'system-search', 'Search', controller: 'search', action: 'index' | ||
= proceed_link "document-new", 'New Project', controller: 'project', action: 'new', ns: User.session!.home_project_name if User.session | ||
- unless @spider_bot | ||
= proceed_link 'utilities-system-monitor', 'Status Monitor', controller: 'monitor', action: 'index' | ||
= proceed_link 'drive-optical-32', 'New Image', image_templates_path | ||
= render partial: 'systemstatus' | ||
.grid_5.omega | ||
- if !User.session and can_register | ||
.box.box-shadow | ||
%h2.box-header New here? Sign up! | ||
= render partial: 'shared/sign_up' | ||
= render partial: 'sponsors' | ||
= render partial: 'status_messages' | ||
= render partial: 'latest_updates' if (@latest_updates and ::Configuration.anonymous) | ||
|
||
.row | ||
.col-md-8.col-lg-7 | ||
.card.mb-3 | ||
.card-body | ||
%h2 | ||
Welcome to #{@configuration['title']} | ||
-# rubocop:disable Rails/OutputSafety | ||
= raw @configuration['description'] | ||
-# rubocop:enable Rails/OutputSafety | ||
.row.no-gutters.text-center#proceed-list | ||
= render partial: 'proceed-list' | ||
= render(partial: 'system_status', locals: { busy: @busy, | ||
building_workers: @building_workers, | ||
overall_workers: @overall_workers, | ||
waiting_packages: @waiting_packages, | ||
host_title: @configuration['title'], | ||
system_stats: @system_stats }) | ||
.col-md-4.col-lg-5 | ||
- if !User.session && can_register | ||
.card.mb-3 | ||
%h5.card-header New here? Sign up! | ||
.card-body | ||
= render partial: 'webui2/shared/sign_up', locals: { submit_btn_text: 'Sign Up' } | ||
= render partial: 'sponsors' | ||
- if @status_messages.present? || User.admin_session? | ||
= render partial: 'status_messages' | ||
= render(partial: 'latest_updates') if @latest_updates && ::Configuration.anonymous |
14 changes: 0 additions & 14 deletions
14
src/api/app/views/webui/status_messages/_create_status_message_dialog.html.haml
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
src/api/app/views/webui/status_messages/_destroy_status_message_dialog.html.haml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/api/app/views/webui2/webui/main/_status_messages.html.haml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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