Skip to content

Commit

Permalink
Merge pull request #114 from alameda-project/workspaces-simplified
Browse files Browse the repository at this point in the history
Workspaces simplified + README improvements
  • Loading branch information
matagus authored Feb 24, 2024
2 parents c15af40 + 660fd4e commit 1eadce3
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 36 deletions.
85 changes: 74 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,91 @@ A very simple project managent tool built with Django & Bulma.io.

Here are some screenshots:

![](https://github.com/matagus/matorral/raw/master/matorral/static/screenshots/stories-1.png)
![](https://github.com/matagus/matorral/raw/main/matorral/static/screenshots/stories-1.png)

![](https://github.com/matagus/matorral/raw/master/matorral/static/screenshots/stories-2.png)
![](https://github.com/matagus/matorral/raw/main/matorral/static/screenshots/stories-2.png)

![](https://github.com/matagus/matorral/raw/master/matorral/static/screenshots/stories-4.png)
![](https://github.com/matagus/matorral/raw/main/matorral/static/screenshots/stories-4.png)

![](https://github.com/matagus/matorral/raw/master/matorral/static/screenshots/epics-1.png)
![](https://github.com/matagus/matorral/raw/main/matorral/static/screenshots/epics-1.png)

![](https://github.com/matagus/matorral/raw/master/matorral/static/screenshots/sprints-1.png)
![](https://github.com/matagus/matorral/raw/main/matorral/static/screenshots/sprints-1.png)

## Installation

TBD
## Features

- Create, edit, delete and list (with pagination) and search Stories, Epics and Sprints
- Stories have assignee, status, priority, points and optionally belong to an Epic and Sprint
- Epics have the same fields and they track progress
- Sprints have start and end dates, and also track progress
- Workspaces to separate stories, epics and sprints
- Login / logout

## Links

TBD
## Roadmap

## Contribute
- Django 5.0 support
- Enhance test coverage
- Run using docker compose
- Upgrade to Bulma 1.0 + Dark mode
- Support for multiple themes
- Realtime updates
- Milestones
- Multiple assigness
- Kanban view
- History
- Comments everywhere
- Attachments for Stories, Epics and Milestones
- Import data from Jira, Github, Asana, etc
- and more!


## Quick Start

### Install and run locally

1. Clone the repository:

```bash
git clone [email protected]:alameda-project/matorral.git
cd matorral
```

2. Install [hatch](https://hatch.pypa.io/latest/) using `pip`:

```
pip install hatch
```

or see [instructions for alternative methods](https://hatch.pypa.io/latest/install/).

3. Run migrations:

```
hatch run local:migrate
```

4. Run the server:

```
hatch run local:server
```

5. Open your browser at `http://localhost:8000`


### Run Tests

`hatch run test:test` will run the tests in every Python + Django versions combination.

`hatch run test.py3.11-4.2:test will run them for python 3.11 and Django 4.2. Please see possible combinations using
`hatch env show` ("test" matrix).


## Contributing

Contributions are welcome! ❤️

PRs accepted.

## License

Expand Down
4 changes: 2 additions & 2 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.contrib.auth import views as auth_views
from django.views import defaults as default_views

from matorral.workspaces.views import redirect_to_workspace
from matorral.workspaces.views import workspace_index


urlpatterns = [
Expand All @@ -32,7 +32,7 @@
path(r'<workspace>/', include('matorral.stories.urls', namespace='stories')),
path(r'<workspace>/sprints/', include('matorral.sprints.urls', namespace='sprints')),

path(r'', redirect_to_workspace, name='redirect_to_workspace')
path(r'', workspace_index, name='workspace:index')

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Expand Down
11 changes: 7 additions & 4 deletions matorral/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h1 class="title has-text-white-bis">

<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start">
{% if current_workspace %}
<a class="navbar-item" href="{% url 'sprints:sprint-list' current_workspace %}">
Sprints
</a>
Expand All @@ -49,7 +50,7 @@ <h1 class="title has-text-white-bis">
<a class="navbar-item" href="{% url 'stories:story-list' current_workspace %}">
Stories
</a>

{% endif %}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
More
Expand Down Expand Up @@ -81,9 +82,11 @@ <h1 class="title has-text-white-bis">
Admin
</a>
{% endif %}
<a class="navbar-item" href="{% url 'workspaces:workspace-list' current_workspace %}">
Workspaces
</a>
{% if current_workspace %}
<a class="navbar-item" href="{% url 'workspaces:workspace-list' current_workspace %}">
Workspaces
</a>
{% endif %}
<a href="{% url 'logout' %}" class="navbar-item">
Logout
</a>
Expand Down
27 changes: 27 additions & 0 deletions matorral/workspaces/templates/workspaces/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% extends 'workspaces/base.html' %}

{% block page_title %}Workspaces{% endblock %}

{% block table_head_content %}
<tr>
<th>Name</th>
<th>Actions</th>
</tr>
{% endblock %}

{% block table_body_content %}
{% for workspace in workspace_list %}
<tr>
<td>
<strong>{{ workspace.name }}</strong><br/>
</td>
<td>
<a class="button is-primary" href="{% url 'stories:story-list' workspace.slug %}">
<span class="icon">
<i class="fas fa-toggle-off"></i>
</span><span>Switch</span>
</a>
</td>
</tr>
{% endfor %}
{% endblock %}
12 changes: 0 additions & 12 deletions matorral/workspaces/templates/workspaces/workspace_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@
<td>{{ workspace.owner }}</td>
<td>{{ workspace.updated_at|default:'' }}</td>
<td>
{% if current_workspace == workspace.slug %}
<a class="button is-primary is-outlined" href="#">
Active Workspace
</a>
{% else %}
<a class="button is-primary" href="{% url 'workspaces:workspace-list' workspace.slug %}">
<span class="icon">
<i class="fas fa-toggle-off"></i>
</span><span>Switch!</span>
</a>
{% endif %}

<a class="button is-link is-outlined" href="{% url 'workspaces:workspace-edit' current_workspace workspace.id %}?next={{ encoded_url }}" title="Edit">
<span class="icon">
<i class="fas fa-edit"></i>
Expand Down
11 changes: 4 additions & 7 deletions matorral/workspaces/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect, JsonResponse
from django.shortcuts import render
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.utils.text import slugify
Expand Down Expand Up @@ -191,10 +192,6 @@ def post(self, *args, **kwargs):


@login_required
def redirect_to_workspace(request):
first_workspace = request.user.workspace_set.order_by('id').first()
return HttpResponseRedirect(
reverse_lazy(
'stories:story-list', kwargs={'workspace': first_workspace.slug}
)
)
def workspace_index(request):
workspace_list = request.user.workspace_set.order_by('name')
return render(request, 'workspaces/index.html', {'workspace_list': workspace_list, 'title': 'Workspaces'})

0 comments on commit 1eadce3

Please sign in to comment.