This repository was archived by the owner on Sep 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
About Page and New Paginator #41
Open
andlas98
wants to merge
15
commits into
master
Choose a base branch
from
frontend2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d9459d3
did a fresh reinstall. Main page loads!
andlas98 c4a1a33
Merged with master. Added slight changes to about.html
andlas98 aee1850
moved webpages content to templates folder. Fixed ShellSource file issue
andlas98 0d2a867
changed about.html and all-petitions to work with Django framework. A…
andlas98 fcf00cd
Fixed bug that prevented the Sort Petitions dropdown box from display…
andlas98 f766b25
added functionality to the paginator(all-petitions)
andlas98 f4c9e00
added first and last page paginator (view-all)
andlas98 527c8b0
added the building blocks (paginator) for splash pages <recent petiti…
andlas98 306cca4
Limits amount of petitions per page to 6(all-petitions). Heading edit…
andlas98 7a24208
Part 1 of pull request changes(removing extraneous comments, for loop…
andlas98 d4a960f
Part 2 of pull request changes (new lines, splash page edits)
andlas98 e18695b
Part 3 of PR changes (paginator fix), added color to the paginator, c…
andlas98 3c606de
removed old pagination file
andlas98 abcc88e
added function for checking resolved and recognized functions (not co…
andlas98 cee9b65
final edits, comments
andlas98 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| {% extends "base.html" %} | ||
| {% block title %}About RPI Petitions{% endblock %} | ||
|
|
||
| {% block content %} | ||
|
|
||
| <div class="container"> | ||
| <h3 class="text-dark text-center pontiac headingbar">About RPI Petitions</h3> | ||
| <br> | ||
| <!-- Navigation tabs --> | ||
| <ul class="nav nav-tabs justify-content-center" role="tablist"> | ||
| <li class="nav-item"> | ||
| <a class="nav-link" data-toggle="tab" href="#history">History</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a class="nav-link active" data-toggle="tab" href="#petprocess">Petition Process</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a class="nav-link" data-toggle="tab" href="#moderation">Moderation</a> | ||
| </li> | ||
| </ul> | ||
| <!-- Tab descriptions --> | ||
| <div class="tab-content"> | ||
| <!--This explains the history of the site. Paraphrased what was in the older website, so this is really just a placeholder--> | ||
| <div id="history" class="container tab-pane fade"><br> | ||
| <p>This version of RPI Petitions is the collaborative effort of members of the Rensselaer Center for Open Source (RCOS), RPI's Web Technologies Group, and Student Senate.</p> | ||
| <p>RPI Petitions exists for the purpose of giving all RPI students the abilty to spark change in their community.</p> | ||
| </div> | ||
|
|
||
| <!--These are the steps we recommend first-time users read before they make a petition. Can be edited based on what features are included in the site's final version--> | ||
| <div id="petprocess" class="container tab-pane active"><br> | ||
| <p>Curious about creating a new petition? Here are some steps to help get you started!</p> | ||
| <blockquote class="blockquote bg-light text-center pontiac">Have an Idea!</blockquote> | ||
| <p>Search for petitions that match your concerns. If a petition for your issue already exists, sign it! This will help raise support for your cause and reach the amount of signatures needed to gain Senate support (250, as of 03/13/2015).</p> | ||
| <hr> | ||
| <blockquote class="blockquote bg-light text-center pontiac">Write your Petition!</blockquote> | ||
| <p> | ||
| <a href="{% url 'create' %}">Create a petition</a> if your issue hasn’t been raised. Use proper grammar and spelling, and make your description clear so that others can easily find your petition. Be sure to review our Moderation Policy (located on the right-most tab of this page) before posting. | ||
| </p> | ||
| <p class="text-danger">Be careful! You can't edit or delete a petition once it has been submitted. </p> | ||
| <hr> | ||
| <blockquote class="blockquote bg-light text-center pontiac">Share your Petition!</blockquote> | ||
| <p>Use social media to spread awareness of your issue!</p> | ||
| <p> A petition has one year to reach its threshold. If the threshold is not reached, then the petition is archived. You can still search for said petition, but you will be unable to sign it. Student Senate may elect to address a petition prior to reaching its threshold.</p> | ||
| </div> | ||
|
|
||
| <!--Details which bodies moderate the site and what's allowed/not allowed for a petition--> | ||
| <div id="moderation" class="container tab-pane fade"><br> | ||
| <p>The Rensselaer Union Student Senate empowers the Elections Committee and Web Technologies Group with moderating privileges on the RPI Petitions website. Petitions deemed inappropriate may be removed from the site at the discretion of these committees, for reasons including but not limited to: </p> | ||
| <ol> | ||
| <b> | ||
| <li>Violation of the Senate Bylaws, Union Constitution, or external laws and regulations including those set by local, regional, or federal government. </li> | ||
| <li>Mandating the hiring or firing of Institute personnel.</li> | ||
| <li>Requesting removal of an elected official without specifying good cause.</li> | ||
| <li>Direct personal attacks or slander.</li> | ||
| <li>Sharing of personal or confidential information.</li> | ||
| <li>Inappropriate or profane language.</li> | ||
| <li>Discriminatory or prejudicial content.</li> | ||
| <li>Redundancy with existing petitions.</li> | ||
| <li>Lack of clarity in the petition's goals.</li> | ||
| <li>Spamming of petitions.</li> | ||
| </b> | ||
| </ol> | ||
| <p>Petitions out-of-scope for the Student Senate may additionally be referred to other organizations where applicable. In all cases where a petition is removed or referred, its sponsor will be notified of the reason for removal or referral.</p> | ||
|
|
||
| <p>To appeal decisions involving a petition's removal or referral, please contact Rules and Elections at [email protected].</p> | ||
|
|
||
| <p>Full moderation rules may be found in Rules and Elections' official <a href="http://docs.studentsenate.rpi.edu/documents/2743/download" target="_blank">Petition and Referendum Handbook</a>.</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {% endblock %} |
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 |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| {% extends "base.html" %} | ||
| {% block title %}View All Petitions{% endblock %} | ||
|
|
||
| {% block content %} | ||
|
|
||
| <div class="container"> | ||
| <h3 class="text-dark headingbar text-center pontiac">All Petitions</h3> | ||
| <div class="row"> | ||
| <!--Resolved Petitions Checkbox--> | ||
| <div class="col-sm-5"> | ||
| <div class="checkbox"> | ||
| <label> | ||
| <input type="checkbox" aria-label="All resolved petitions checkbox"> Show All Resolved | ||
| </label> | ||
| </div> | ||
| </div> | ||
| <!--Recognized Petitions Checkbox--> | ||
| <div class="col-sm-4"> | ||
| <div class="checkbox"> | ||
| <label> | ||
| <input type="checkbox"> Show All Recognized | ||
| </label> | ||
| </div> | ||
| </div> | ||
| <!--Sort Petitions Dropdown Menu--> | ||
| <div class="col-sm-3"> | ||
| <div class="dropleft float-right"> | ||
| <button class="btn btn-secondary dropdown-toggle" type="button" id="tagdropdown" data-toggle="dropdown" | ||
| aria-haspopup="true" aria-expanded="false"> | ||
| Sort By: | ||
| </button> | ||
| <div class="dropdown-menu" aria-labelledby="tagdropdown"> | ||
| <a class="dropdown-item" href="#">Most Recent</a> | ||
| <a class="dropdown-item" href="#">Most Signatures</a> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <br> | ||
|
|
||
| <!--Displays cards--> | ||
| <div class="container"> | ||
| <ul class="card-columns"> | ||
| {% for petition in petitions %} | ||
| <li class="card bg-light"> | ||
| <div class="card-body text-center"> | ||
| <h5 class="card-title text-center"><a href="#">{{ petition.title }}</a></h5> | ||
| <h6 class="card-subtitle mb-2">{{ petition.signatures.count }} signatures</h6> | ||
| {% for tag in petition.tags.all %} | ||
| <a href="#" class=" Tag link">{{ tag }}</a><br> | ||
| {% endfor %} | ||
| </div> | ||
| </li> | ||
| <!--If there are no petitions, display this message--> | ||
| {% empty %} | ||
| <p>No petitions yet. Stay tuned!</p> | ||
| {% endfor %} | ||
| </ul> | ||
| </div> | ||
|
|
||
| <!--Paginator Test--> | ||
| {% if petitions.has_other_pages %} | ||
| <ul class="pagination justify-content-center"> | ||
| <!--if there are any accessable petitions before the page that we're on, be able to get access to that 'page' of information--> | ||
| {% if petitions.has_previous %} | ||
| <li class="page-item"> | ||
| <a class="page-link" href="?page=1">First</a> | ||
| </li> | ||
| <li class="page-item"> | ||
| <a class="page-link" href="?page={{ petitions.previous_page_number }}">«</a> | ||
| </li> | ||
| <!--Else disable left arrow--> | ||
| {% else %} | ||
| <li class="page-item disabled"><span class="page-link">First</li> | ||
| <li class="page-item disabled"><span class="page-link">«</span></li> | ||
| {% endif %} | ||
| <!--Page number logic--> | ||
| {% for i in petitions.paginator.page_range %} | ||
| {% if petitions.number == i %} | ||
| <li class="page-item active"> | ||
| <span class="page-link">{{ i }}<span class="sr-only">(current)</span></span></li> | ||
| {% else %} | ||
| <li><a class="page-link" href="?page={{ i }}">{{ i }}</a></li> | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% if petitions.has_next %} | ||
| <!--Link to the next page of objects--> | ||
| <li class="page-item"> | ||
| <a class="page-link" href="?page={{ petitions.next_page_number }}">»</a> | ||
| </li> | ||
| <!--Link to the last page--> | ||
| <li class="page-item"> | ||
| <a class="page-link" href="?page={{ petitions.paginator.num_pages }}">Last</a> | ||
| </li> | ||
| {% else %} | ||
| <li class="page-item disabled"><span class="page-link">»</span></li> | ||
| <li class="page-item disabled"><span class="page-link">Last</li> | ||
| {% endif %} | ||
| </ul> | ||
| {% endif %} | ||
| {% endblock %} |
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| {% extends "base.html" %} | ||
| {% block title %}Create A Petition{% endblock %} | ||
|
|
||
| {% block content %} | ||
| <!--Page Heading--> | ||
| <div class="container"> | ||
| <h3 class="text-dark headingbar text-center pontiac">Create a Petition</h3> | ||
| </div> | ||
| <!--Warning block--> | ||
| <div class="container preface"> | ||
| <p>If this is your first time creating a petition on RPI Petitions, please read our fantastic <a href="about.html" | ||
| class="guidelink"> one-minute guide</a>. | ||
| <br><br> | ||
| Note: You <span style="color:red">cannot</span> manually edit or delete the petition once it is submitted (so | ||
| read through it twice!).</p> | ||
| </div> | ||
|
|
||
| <!--Contains all the inputs needed for creating a petition (title, tag(s), description)--> | ||
| <div class="container creating"> | ||
| <!--Enter your petition's name. There will be a character limit to keep the sections neat and enforce simple titles--> | ||
| <div class="input-group mb-3"> | ||
| <div class="input-group-prepend"> | ||
| <span class="input-group-text" id="basic-addon1">Name:</span> | ||
| </div> | ||
| <input type="text" class="form-control" placeholder="Enter petition name here" aria-label="Username" | ||
| aria-describedby="basic-addon1"> | ||
| </div> | ||
| <!--All tags from the original website. Users are only allowed to pick 3 tags (need to create an algorithm) to stop the user after they've chosen 3--> | ||
| <div class="dropdown mb-3"> | ||
| <button class="btn dropdown-toggle" type="button" id="tagdropdown" data-toggle="dropdown" aria-haspopup="true" | ||
| aria-expanded="false">Petition Tags <span style="font-size: 10px">(max of 3)</span></button> | ||
| <div class="dropdown-menu" aria-labelledby="all-tags"> | ||
| <a class="dropdown-item" href="#">Academics</a> | ||
| <a class="dropdown-item" href="#">Athletics</a> | ||
| <a class="dropdown-item" href="#">Communications</a> | ||
| <a class="dropdown-item" href="#">Community</a> | ||
| <a class="dropdown-item" href="#">Dining Services</a> | ||
| <a class="dropdown-item" href="#">Extracurriculars</a> | ||
| <a class="dropdown-item" href="#">Facilities</a> | ||
| <a class="dropdown-item" href="#">Greek Life</a> | ||
| <a class="dropdown-item" href="#">Health Services</a> | ||
| <a class="dropdown-item" href="#">Rensselaer Union</a> | ||
| <a class="dropdown-item" href="#">Research</a> | ||
| <a class="dropdown-item" href="#">Residence Life</a> | ||
| <a class="dropdown-item" href="#">Safety</a> | ||
| <a class="dropdown-item" href="#">Student Government</a> | ||
| <a class="dropdown-item" href="#">Student Life</a> | ||
| <a class="dropdown-item" href="#">Student Rights</a> | ||
| <a class="dropdown-item" href="#">Technology Services</a> | ||
| <a class="dropdown-item" href="#">Tradition</a> | ||
| <a class="dropdown-item" href="#">Transportation</a> | ||
| </div> | ||
| </div> | ||
| <div class="input-group"> | ||
| <div class="input-group-prepend"> | ||
| <span class="input-group-text">Description</span> | ||
| </div> | ||
| <textarea class="form-control" placeholder="Talk about why you're excited about this petition!" | ||
| aria-label="petition-description"></textarea> | ||
| </div> | ||
| </div> | ||
| <!--The 'send petition' button--> | ||
| <div class="container" role="group" aria-label="sendPetition"> | ||
| <button class="btn ">Create Petition</button> | ||
| </div> | ||
| {% endblock %} |
This file was deleted.
Oops, something went wrong.
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.