Skip to content
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

Update master with latest version #93

Merged
merged 4 commits into from
Oct 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

PHP web app for planning poker. It includes a master view for the ScrumMaster and a simple responsive card view for the team. A deployed demo is available at http://www.scrumpoker.online

## Sponsors
The project is supported by the following sponsors. If you would like to become a sponsor yourself, please take a look [at the section below](#sponsoring).

```md
[![Company Logo](https://example.com/logo.svg)](https://example.com)
```

## Idea
Everyone who ever managed a software project using scrum will have either heard of or played planning poker. It is a simple tool to determine a stories/features complexity. For the detailed process refer to https://en.wikipedia.org/wiki/Planning_poker. So far there are a couple of apps where you can select a card and display it on the screen - but none of them offer a network collaboration mode. Some of the existing web apps are nowhere near responsive or come with too overloaded UIs. I want to create a simple web app where the Scrum Master can start a named session and all team members can join the session.

Expand All @@ -25,3 +32,13 @@ For every story the Scrum Master will than start a poll and each member of the s
If you want to contribute you can just clone the repository and follow the deployment instructions. We also offer support for [Vagrant](doc/Vagrant.md) and [Docker](doc/Docker.md). Any changes must be commited to a fork and then merged by issuing a pull request. For information on the REST API or ticketing plugins please have a look at the [wiki documentation](https://github.com/Toxantron/scrumonline/blob/master/doc/).

You can also use the [REST API](https://github.com/Toxantron/scrumonline/blob/master/doc/Developer-Documentation.md) to build a mobile for iOS or Android. In that case I am happy to link your app in the README and on the page.

## Sponsoring
If you want to support the project, you can become an official sponsor. There are three different levels of sponsoring and each is rewarded with your logo and link in different places. The price for the next level always includes the previous levels privileges. Prices only show the current price for each type and may
change over time based on demand. To become an official sponsor please contact sponsoring@scrumpoker.online with the [necessary information](https://github.com/Toxantron/scrumonline/blob/master/src/sponsors.php) and your desired sponsoring level. You will recieve an official invoice for your sponsorship, which makes it tax deductible for companies. Within 7 days after payment the page will be updated with your logo. Alternatively if you contribute developer time or server resources, you can also be listed as a sponsor.

| Level | Price annually | Logo placement |
|---|---:|---|
| Basic | 20€ | Sponsors tab |
| Footer | 100€ | Footer |
| Repo | 150€ | README on GitHub |
12 changes: 11 additions & 1 deletion src/controllers/session-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function create()
if ($private)
$token = $this->createHash($data["name"], $data["password"]);
else
$token = $this->createHash($data["name"], bin2hex(random_bytes(8)));
$token = $this->createHash($data["name"], $this->randomKey());
$session->setToken($token);

$session->setLastAction(new DateTime());
Expand All @@ -53,6 +53,16 @@ public function create()
return new NumericResponse($session->getId());
}

// Generate a random key for the public session token
private function randomKey()
{
if (PHP_MAJOR_VERSION >= 7)
$bytes = random_bytes(8);
else
$bytes = openssl_random_pseudo_bytes(8);
return bin2hex($bytes);
}

// Add or remove member
// URL: /api/session/member/{id}/?{mid}
public function member($sessionId, $memberId = 0)
Expand Down
30 changes: 29 additions & 1 deletion src/css/scrumonline.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.container-fluid.main {
min-height: 900px;
min-height: 800px;
padding-top: 55px;
}

Expand Down Expand Up @@ -311,4 +311,32 @@ div.issue-list {
border-width: 1px 0;
border-style: dotted;
border-color: rgba(255, 255, 255, 0.7);
}

/* Styling of sponsors */
footer div.sponsors {
margin-left: 10%;
max-width: 80%;
}
div.sponsors a, span {
margin: 5px;
}
div.sponsors a img {
height: 40px;
}
/* Donors */
div.donors>div {
margin: 10px;
display: inline-block;
vertical-align: top;
}
div.message {
font-style: italic;
max-width: 200px;
margin-bottom: 5px;
}
div.donor {
width: 100;
text-align: center;
font-weight: bold;
}
11 changes: 7 additions & 4 deletions src/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
include "config.php";
include "templates/templates.php";
include "sponsors.php";

$templates = Template::getAll();

Expand Down Expand Up @@ -35,6 +36,9 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/normalize.css">
<link rel="stylesheet" href="/css/scrumonline.css">

<!-- Pretty cookie consent and styling -->
<?php include("templates/cookie_notice.php") ?>
</head>
<body ng-app="scrum-online">
<!--[if lt IE 8]>
Expand Down Expand Up @@ -76,11 +80,10 @@
<?php $indexPage->render(false) ?>
</div>

<!-- Footer contains sponsors -->
<footer class="page-footer font-small">
<!-- Cookie warning -->
<div class="footer-copyright text-center py-3">This application uses cookies. For more information take a look at the
<a href="<?= $src ?>doc/Cookies.md"> documentation</a>.
</div>
<h3>Sponsored by</h3>
<?= Sponsor::renderFooter() ?>
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
Expand Down
3 changes: 3 additions & 0 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ scrum.app.config(
controllerAs: 'member',
pageTrack: '/member'
})
.when('/sponsors', {
templateUrl: 'sponsors.html',
})
.when('/impressum', {
templateUrl: 'impressum.html',
})
Expand Down
74 changes: 74 additions & 0 deletions src/sponsors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?php
// Defintion of a sponsor object. It contains the necessary information
// sponsors need to provide
class Sponsor
{
// Link url of the sponsor
private $linkURL;

// URL of the sponsors logo
private $logoURL;

function __construct($linkURL, $logoURL)
{
$this->linkURL = $linkURL;
$this->logoURL = $logoURL;
}

// Render this sponsor instance
public function render()
{
return "<a href=\"" . $this->linkURL . "\"><img src=\"" . $this->logoURL . "\"></a>";
}

public static function renderFooter()
{
$sponsors = [
// All sponsors for the footer
//new Sponsor("https://example.com", "https://example.com/logo.png"),
];

Sponsor::renderSponsors($sponsors);
}

public static function renderOthers()
{
$sponsors = [
// All sponsors for the sponsors tab
//new Sponsor("https://example.com", "https://example.com/logo.png"),
];

Sponsor::renderSponsors($sponsors);
}

private static function renderSponsors($sponsors)
{
echo "<div class=\"sponsors\">";

foreach($sponsors as $sponsor)
echo $sponsor->render();

echo "</div>";
}

private static $donors = [
//"Author" => "Message"
];

public static function donorCount()
{
return sizeof(Sponsor::$donors);
}

public static function renderDonors()
{
echo "<div class=\"donors\">";

foreach (Sponsor::$donors as $donorName => $message) {
echo "<div><div class=\"message\">\"" . $message ."\"</div><div class=\"donor\">" . $donorName . "</div></div>";
}

echo "</div>";
}
}

19 changes: 19 additions & 0 deletions src/templates/cookie_notice.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#eb6c44",
"text": "#ffffff"
},
"button": {
"background": "#f5d948"
}
},
"content": {
"href": "<?= $src ?>doc/Cookies.md"
}
})});
</script>
14 changes: 14 additions & 0 deletions src/templates/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@
(TV or projector) and let everyone else join via smartphone. To join a session just enter the id displayed in the
heading of the scrum master view.
</p>

<p>
Developing, maintaining and hosting this application costs personal time and money. Almost 20.000 users access the application
each month to perform over 28.000 polls. This increase in traffic will exceed the current hosting soon and requires additional
funding. I would also like to setup mirrors around the world for comparable loading times. To keep the page ad-free, I am asking
for your help. If you would like to support my efforts and help keep the lights on, you can either donate trough the button below
or <a target="_blank" href="https://github.com/Toxantron/scrumonline#sponsoring">become an official sponsor</a>.
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="ULK4XY7UZRZL8">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/de_DE/i/scr/pixel.gif" width="1" height="1">
</form>
</article>
</div>

Expand Down
14 changes: 14 additions & 0 deletions src/templates/sponsors_view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div>
<h1>Other Sponsors:</h1>

<?= Sponsor::renderOthers() ?>
</div>

<div>
<h1>Donors (<?= Sponsor::donorCount() ?> total):</h1>

<?= Sponsor::renderDonors() ?>
</div>



1 change: 1 addition & 0 deletions src/templates/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static function getAll()
new Template("default_source.html", "templates/default_source.html"),
new Template("add_source.html", "templates/add_source.html"),
new Template("member.html", "templates/member.php"),
new Template("sponsors.html", "templates/sponsors_view.php", "Sponsors"),
new Template("impressum.html", "templates/impressum.html", "Impressum"),
new Template("removal.html", "templates/removal.html"),
new Template("404.html", "templates/404.html")
Expand Down