Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !1231

Associations button

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/KjellMorgenstern/associations-button into master Oct 25, 2018
  • Overview 13
  • Commits 5
  • Pipelines 0
  • Changes 9

Created by: KjellMorgenstern

This pull request adds a button for creating new items underneath each "has_many" field. Example: class order has many line_items. In the GET admin/orders/1 view, the line_items are listed. Now, after that list, a "New line_item" button is added. When clicked, it leads to GET admin/orders/1/line_items#new , and the line_item form has order#1 preselected in the order_id field.

I use this by default for each model. Maybe others find it useful, so here is a generic version of it. I think the layout could use some polishing (using 'div' is probably not in line with adminstrate), but first I'd like to collect some feedback.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/KjellMorgenstern/associations-button