Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • whats-open whats-open
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SRCT
  • whats-openwhats-open
  • Issues
  • #41

Closed
Open
Created Mar 19, 2017 by Mark Stenglein@mstengle

Add the ability to set an alert message to the front page

Roomlist has something like the following implemented that shows a random message to users who log in:

{% if messages %}
  {% for message in messages %}
  <div class="row">
    <div class="col-md-12">
      <div class="alert alert-{{ message.tags }} alert-dismissable text-center" style='font-size:14px' role="alert">
      <button type="button" class="close" data-dismiss="alert" aria-label="close"><span aria-hidden="true">&times;</span></button>
      <strong>{{ message }}</strong>
      </div>
    </div>
  </div>
  {% endfor %}
{% endif %}

I want something very similar to this only that allows us to define one field for the message tag and the message contents in the admin interface, so that we don't have to ping @patriot_down to add an alert to the page.

Off the top of my head I imagine it would require adding an alerts table which allows us to define a variety of different alerts, their type and contents, and then separately select the particular alert which should be active (restricted such that only one can ever actually be active at a time).

I'm thinking an alert object would look something like this:

alert: {
    tags: [String(), ...],
    message: String(),
    startDate: Date(),
    endDate: Date()
}

Somebody with a bit more django specific knowledge might be able to further refine my words into specific implementations, feel free to comment pls.

Assignee
Assign to
Time tracking