Repository navigation
Prevent changes to archived project #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6af2dc9
Prevent changes to archived project
abc9cb3
Merge branch 'main' into fix/changes-to-archived-project
39a37c4
Adding helper to handle buttons
2275fb7
Fix merge conflicts
0675b68
Addressing code review feedback
4f16364
Fix merge conflicts
465423d
Allow the link_to helper to accept icons
51e81c5
Fix rspec tests
72948ed
Prevent changes to stories of an unarchived project
30f0a46
Prevent change to stories of an archived project
9a4ba73
Fix issue to show icon when the project is archived
cd9e87a
Fix merge conflicts
cleicar 642b800
Addressing comments
cleicar 4d00d57
Fix merge conflicts
cleicar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,6 +1,8 @@ | ||
| <% bootstrap_alert_names = {"success" => "success", "error" => "danger"}%> | ||
| <% if flash[:success] || flash[:error] %> | ||
| <% flash.each do |key, value| %> | ||
| <div class="alert alert-<%= bootstrap_alert_names[key] %>"><%= value %></div> | ||
| <div class="container"> | ||
| <% if flash[:success] || flash[:error] %> | ||
| <% flash.each do |key, value| %> | ||
| <div class="alert alert-<%= bootstrap_alert_names[key] %>"><%= value %></div> | ||
| <% end %> | ||
| <% end %> | ||
| <% end %> | ||
| </div> |
This file contains hidden or 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 hidden or 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,14 @@ | ||
| (function() { | ||
| toggleButtonText(); | ||
| toggleProjectStatus(); | ||
| window.location.reload(); | ||
| })() | ||
|
|
||
| function toggleButtonText() { | ||
| let button_text = document.querySelector('#toggle_archive'); | ||
|
|
||
| if (button_text.textContent == "Archive Project") { | ||
| button_text.textContent = "Unarchive Project" | ||
| button_text.textContent = "Unarchive Project"; | ||
| } else { | ||
| button_text.textContent = "Archive Project" | ||
| } | ||
| } | ||
|
|
||
| function toggleProjectStatus() { | ||
| let statusBadge = document.querySelector(".status-badge"); | ||
| let projectStatus = "<%= @project.status %>"; | ||
|
|
||
| if (projectStatus === ""){ | ||
| statusBadge.classList.add("hide") | ||
| statusBadge.textContent = "" | ||
| } | ||
| else{ | ||
| statusBadge.classList.remove("hide") | ||
| statusBadge.classList.add(projectStatus) | ||
| statusBadge.textContent = projectStatus | ||
| button_text.textContent = "Archive Project"; | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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,2 +1,2 @@ | ||
| Rack::MiniProfiler.config.start_hidden = true | ||
| Rack::MiniProfiler.config.toggle_shortcut = "Alt+Ctrl+P" | ||
| Rack::MiniProfiler.config.toggle_shortcut = "Alt+Ctrl+P" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.