Adjective endings in all cases
After der, ein and words like them, an adjective before a noun takes -en in the Dativ and the Genitiv, and with no article it shows the case itself: -em, -er, -em in the Dativ.
After der, dieser and welcher: -e in the nominative singular and in the Akkusativ of feminine and neuter nouns, -en everywhere else: den alten Film, mit dem alten Film, des alten Films, mit der neuen Ausstellung, in den großen Museen.
After ein, kein and mein: -er, -e, -es in the nominative and -en, -e, -es in the Akkusativ. In the Dativ and the Genitiv, and in the plural after kein and mein, the ending is -en: mit einem guten Freund, wegen eines kleinen Problems.
Without an article the adjective shows the case itself: -er, -e, -es in the nominative, -en, -e, -es in the Akkusativ and -em, -er, -em in the Dativ: bei schönem Wetter, mit großer Freude, mit frischem Gemüse. In the plural it is -e in the nominative and the Akkusativ and -en in the Dativ: Mit freundlichen Grüßen.
Adjectives made from city names with -er never change: der Hamburger Hafen, im Hamburger Hafen.